zoom

package
v0.0.0-...-37f1e7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// other
	WS_CONN_KEEPALIVE     = 0 // WebsocketConnectionKeepalive
	NEED_UPDATE_WEBSDK    = 1
	CONF_EVT_TYPE_BASE    = 4096
	AUDIO_EVT_TYPE_BASE   = 8192
	VIDEO_EVT_TYPE_BASE   = 12288
	SHARING_EVT_TYPE_BASE = 16384
	XMPP_EVT_TYPE_BASE    = 24576
	// websocket
	WS_CONF_JOIN_REQ                                 = 4097
	WS_CONF_JOIN_RES                                 = 4098 // JoinConferenceResponse
	WS_CONF_LOCK_REQ                                 = 4099
	WS_CONF_LOCK_RES                                 = 4100
	WS_CONF_END_REQ                                  = 4101 // ConferenceEndRequest
	WS_CONF_END_RES                                  = 4102
	WS_CONF_LEAVE_REQ                                = 4103
	WS_CONF_LEAVE_RES                                = 4104
	WS_CONF_RECORD_REQ                               = 4105
	WS_CONF_RECORD_RES                               = 4106
	WS_CONF_EXPEL_REQ                                = 4107
	WS_CONF_EXPEL_RES                                = 4108
	WS_CONF_RENAME_REQ                               = 4109 // ConferenceRenameRequest
	WS_CONF_ASSIGN_HOST_REQ                          = 4111
	WS_CONF_PUT_ON_HOLD_REQ                          = 4113
	WS_CONF_SET_MUTE_UPON_ENTRY_REQ                  = 4115 // ConferenceSetMuteUponEntryRequest
	WS_CONF_SET_HOLD_UPON_ENTRY_REQ                  = 4117
	WS_CONF_INVITE_CRC_DEVICE_REQ                    = 4119
	WS_CONF_INVITE_CRC_DEVICE_RES                    = 4120
	WS_CONF_CANCEL_INVITE_CRC_DEVICE_REQ             = 4121
	WS_CONF_CANCEL_INVITE_CRC_DEVICE_RES             = 4122
	WS_CONF_SET_BROADCAST_REQ                        = 4123
	WS_CONF_SET_BROADCAST_RES                        = 4124
	WS_CONF_CLOSED_CAPTION_REQ                       = 4125
	WS_CONF_CLOSED_CAPTION_RES                       = 4126
	WS_CONF_ALLOW_VIEW_PARTICIPANT_REQ               = 4127
	WS_CONF_LOWER_ALL_HAND_REQ                       = 4129
	WS_CONF_RAISE_LOWER_HAND_REQ                     = 4131
	WS_CONF_RECLAIM_HOST_REQ                         = 4133
	WS_CONF_CHAT_REQ                                 = 4135 // ConferenceChatRequest
	WS_CONF_ASSIGN_CC_REQ                            = 4137
	WS_CONF_CHAT_PRIVILEDGE_REQ                      = 4141 // ConferenceChatPrivilegeRequest
	WS_CONF_FEEDBACK_REQ                             = 4143
	WS_CONF_FEEDBACK_CLEAR_REQ                       = 4145
	WS_CONF_ALLOW_UNMUTE_VIDEO_REQ                   = 4147 // ConferenceAllowUnmuteVideoRequest
	WS_CONF_ALLOW_UNMUTE_AUDIO_REQ                   = 4149 // ConferenceAllowUnmuteAudioRequest
	WS_CONF_ALLOW_RAISE_HAND_REQ                     = 4151
	WS_CONF_PANELIST_VOTE_REQ                        = 4153
	WS_CONF_BO_TOKEN_REQ                             = 4173
	WS_CONF_BO_TOKEN_RES                             = 4174 // ConferenceBreakoutRoomTokenResponse
	WS_CONF_BO_START_REQ                             = 4175 // ConferenceBreakoutRoomStartRequest
	WS_CONF_BO_STOP_REQ                              = 4177
	WS_CONF_BO_ASSIGN_REQ                            = 4179
	WS_CONF_BO_SWITCH_REQ                            = 4181
	WS_CONF_BO_WANT_JOIN_REQ                         = 4183
	WS_CONF_BO_LEAVE_REQ                             = 4185
	WS_CONF_BO_BROADCAST_REQ                         = 4187 // ConferenceBreakoutRoomBroadcastRequest
	WS_CONF_BO_HELP_REQ                              = 4189
	WS_CONF_BO_HELP_RESULT_REQ                       = 4191
	WS_CONF_BO_JOIN_REQ                              = 4193 // ConferenceBreakoutRoomJoinRequest
	WS_CONF_BO_JOIN_RES                              = 4194 // ConferenceBreakoutRoomJoinResponse
	WS_CONF_ALLOW_PARTICIPANT_RENAME_REQ             = 4163 // ConferenceAllowParticipantRenameRequest
	WS_CONF_ALLOW_MESSAGE_FEEDBACK_NOTIFY_REQ        = 4171
	WS_CONF_REVOKE_COHOST_REQ                        = 4195
	WS_CONF_PLAY_CHIME_OPEN_CLOSE_REQ                = 4197
	WS_CONF_ADMIT_ALL_SILENT_USERS_REQ               = 4199
	WS_CONF_BIND_UNBIND_TELE_USR_REQ                 = 4201
	WS_CONF_ALLOW_QA_AUTO_REPLY_REQ                  = 4203
	WS_CONF_EXPEL_ATTENDEE_REQ                       = 4205
	WS_CONF_EXPEL_ATTENDEE_RES                       = 4206
	WS_CONF_PRACTICE_SESSION_REQ                     = 4207
	WS_CONF_PRACTICE_SESSION_RES                     = 4208
	WS_CONF_ROLE_CHANGE_REQ                          = 4209
	WS_CONF_ROLE_CHANGE_RES                          = 4210
	WS_CONF_BO_TOKEN_BATCH_REQ                       = 4211 // ConferenceBreakoutRoomTokenBatchRequest
	WS_CONF_BO_PRE_ASSIGN_REQ                        = 4213
	WS_CONF_BO_PRE_ASSIGN_RES                        = 4214
	WS_CONF_CHANGE_MULTI_PIN_PRIVILGE_REQ            = 4217
	WS_CONF_SET_GROUP_LAYOUT                         = 4219
	WS_CONF_HOST_KEY_REQ                             = 4215
	WS_CONF_HOST_KEY_RES                             = 4216
	WS_CONF_AVATAR_PERMISSION_CHANGED                = 4222 // ConferenceAvatarPermissionChanged
	WS_CONF_SUSPEND_MEETING                          = 4229
	WS_CONF_SUSPEND_MEETING_REQ_RESULT               = 4230
	WS_AUDIO_MUTE_REQ                                = 8193 // AudioMuteRequest
	WS_AUDIO_MUTE_RES                                = 8194
	WS_AUDIO_DROP_REQ                                = 8195
	WS_AUDIO_DROP_RES                                = 8196
	WS_AUDIO_DIALOUT_REQ                             = 8197
	WS_AUDIO_DIALOUT_RES                             = 8198
	WS_AUDIO_CANCEL_DIALOUT_REQ                      = 8199
	WS_AUDIO_CANCEL_DIALOUT_RES                      = 8200
	WS_AUDIO_MUTEALL_REQ                             = 8201 // AudioMuteAllRequest
	WS_AUDIO_MUTEALL_RES                             = 8202
	WS_AUDIO_ALLOW_TALK_REQ                          = 8204
	WS_AUDIO_ALLOW_TALK_RES                          = 8205
	WS_CONF_ROSTER_INDICATION                        = 7937 // ConferenceRosterIndication
	WS_CONF_ATTRIBUTE_INDICATION                     = 7938 // ConferenceAttributeIndication
	WS_CONF_END_INDICATION                           = 7939
	WS_CONF_HOST_CHANGE_INDICATION                   = 7940 // ConferenceHostChangeIndication
	WS_CONF_COHOST_CHANGE_INDICATION                 = 7941 // ConferenceCohostChangeIndication
	WS_CONF_HOLD_CHANGE_INDICATION                   = 7942 // ConferenceHoldChangeIndication
	WS_CONF_CLOSED_CAPTION_INDICATION                = 7943
	WS_CONF_CHAT_INDICATION                          = 7944 // ConferenceChatIndication
	WS_CONF_OPTION_INDICATION                        = 7945 // ConferenceOptionIndication
	WS_CONF_KV_UPDATE_INDICATION                     = 7946
	WS_CONF_LOCAL_RECORD_INDICATION                  = 7947 // ConferenceLocalRecordIndication
	WS_AUDIO_VOIP_JOIN_CHANNEL_REQ                   = 8203 // AudioVoipJoinChannelRequest
	WS_CONF_BO_COMMAND_INDICATION                    = 7949 // ConferenceBreakoutRoomCommandIndication
	WS_CONF_BO_ATTRIBUTE_INDICATION                  = 7950 // ConferenceBreakoutRoomAttributeIndication
	WS_CONF_ADMIT_ALL_SILENT_USERS_INDICATION        = 7951
	WS_CONF_BIND_UNBIND_INDICATION                   = 7952
	WS_CONF_UPDATE_MEETING_TOPIC_INDICATION          = 7953
	WS_CONF_DC_REGION_INDICATION                     = 7954 // ConferenceDCRegionIndication
	WS_CONF_CAN_ADMIT_WHEN_NOHOST_PRESENT_INDICATION = 7955
	WS_CONF_GROUP_LAYOUT_INDICATION                  = 7958
	WS_AUDIO_ASN_INDICATION                          = 12033 // AudioAsnIndication
	WS_AUDIO_MUTE_INDICATION                         = 12034
	WS_AUDIO_SSRC_INDICATION                         = 12035 // AudioSSRCIndication
	WS_AUDIO_ALLOW_TALK_INDICATION                   = 12036
	WS_AUDIO_SSRC_ASK_UNMUTE_INDICATION              = 12037
	WS_WEBINAR_VIEW_ONLY_TELEPHONY_INDICATION        = 12038
	WS_VIDEO_MULTI_SUBSCRIBE_REQ                     = 12303
	WS_VIDEO_MULTI_UNSUBSCRIBE_REQ                   = 12305
	WS_VIDEO_ACTIVE_INDICATION                       = 16129 // VideoActiveIndication
	WS_VIDEO_SSRC_INDICATION                         = 16131 // SSRCIndication
	WS_VIDEO_MUTE_INDICATION                         = 16133
	WS_VIDEO_LEADERSHIP_INDICATION                   = 16135
	WS_VIDEO_SUBSCRIBE_REQ                           = 12289
	WS_VIDEO_UNSUBSCRIBE_REQ                         = 12291
	WS_VIDEO_KEY_FRAME_REQ                           = 12293
	WS_VIDEO_NETWORK_FEEDBACK                        = 12295
	WS_VIDEO_MUTE_VIDEO_REQ                          = 12297
	WS_VIDEO_SPOTLIGHT_VIDEO_REQ                     = 12299
	WS_SHARING_PAUSE_REQ                             = 16385
	WS_SHARING_RESUME_REQ                            = 16387
	WS_SHARING_STATUS_INDICATION                     = 20225 // SharingStatusIndication
	WS_SHARING_SIZE_CHANGE_INDICATION                = 20226
	WS_CONF_ALLOW_ANONYMOUS_QUESTION_REQ             = 4155
	WS_CONF_ALLOW_VIEW_ALL_QUESTION_REQ              = 4157
	WS_CONF_ALLOW_UPVOTE_QUESTION_REQ                = 4159
	WS_CONF_ALLOW_COMMENT_QUESTION_REQ               = 4161
	WS_SHARING_REMOTE_CONTROL_REQ                    = 16389
	WS_SHARING_REMOTE_CONTROL_INDICATION             = 16391
	WS_SHARING_REMOTE_CONTROLLER_GRAB                = 16393
	WS_SHARING_REMOTE_CONTROLLER_GRAB_INDICATION     = 16395
	WS_SHARING_SUBSCRIBE_REQ                         = 16415
	WS_SHARING_UNSUBSCRIBE_REQ                       = 16417
	WS_SHARING_ASSIGNED_SENDING_SSRC                 = 20227
	WS_SHARING_ENCRYPT_KEY_INDICATION                = 20234
	WS_SHARING_RECEIVING_CHL_READY_INDICATION        = 20235
	WS_SHARING_RECEIVING_CHL_CLOSE_INDICATION        = 20236
	WS_MEETING_RWG_CONNECT_TIME                      = 4167
	WS_VIDEO_DATACHANNEL_ANSWER                      = 24322
	DATA_CHANNEL_SEND_OFFER_TO_RWG                   = 24321
	WS_CONF_FOLLOW_HOST_REQ                          = 4223
	WS_CONF_DRAG_LAYOUT_INDICATION                   = 7957
	WS_CONF_SET_DRAG_LAYOUT                          = 4218
	WS_CONF_LIVE_TRANSCRIPTION_ON_OFF_REQ            = 4227
	WS_CONF_LIVE_TRANSCRIPTION_ON_OFF_RES            = 4228
	WS_CONF_LIVE_TRANSCRIPTION_STATUS_INDICATION     = 7959
	WS_CONF_POLLING_REQ                              = 4165
	WS_CONF_POLLING_USER_ACTION_REQ                  = 4224
	WS_CONF_POLLING_USER_ACTION_ERROR                = 4225
	WS_CONF_POLLING_SET_POLLING_TOKEN                = 4226

	// OTHER NOT FOUND DIRECTLY IN JAVASCRIPT
	WS_CONF_LOCK_SHARE_REQ       = 4169  // ConferenceLockShareRequest
	WS_CONF_SET_SHARE_STATUS_REQ = 16409 // SetShareStatusRequest
)

from webclient.js

View Source
const (
	CMM_SHARE_SETTING_HOST_GRAB   = 0
	CMM_SHARE_SETTING_LOCK_SHARE  = 1
	CMM_SHARE_SETTING_ANYONE_GRAB = 2
	CMM_SHARE_SETTING_MULTI_SHARE = 3
)

settings for WS_CONF_LOCK_SHARE_REQ

View Source
const (
	CHAT_EVERYONE_PUBLICLY_PRIVATELY = 1
	CHAT_HOST_ONLY                   = 3
	CHAT_NO_ONE                      = 4
	CHAT_EVERYONE_PUBLICLY           = 5
)
View Source
const (
	PING                = 0x00
	RTP_SCREENSHARE_PKT = 0x4D
	// RTP_VIDEO_PKT          = 0x02 // DEPRECRATED!
	RTP_AUDIO_PKT    = 0x6B
	RTP_VIDEO_PKT    = 0x67
	RTCP             = 0x4E
	AES_GCM_IV_VALUE = 0x42
)
View Source
const (
	EVERYONE_CHAT_ID = 0
)
View Source
const ZOOM_ROLE string = "0"

Variables

View Source
var MessageNumberToName map[int]string = map[int]string{}/* 163 elements not displayed */

for debugging and logging purposes only - use enum in code

Functions

func GetMessageBody

func GetMessageBody(message *GenericZoomMessage) (interface{}, error)

func Recorder

func Recorder() (io.WriteCloser, error)

func ZoomEscapedBase64Decode

func ZoomEscapedBase64Decode(encoded string) ([]byte, error)

Types

type AudioAsnIndication

type AudioAsnIndication struct {
	Asn1 int `json:"asn1"`
}

type AudioMuteAllRequest

type AudioMuteAllRequest struct {
	BMute bool `json:"bMute"`
}

type AudioMuteRequest

type AudioMuteRequest struct {
	BMute bool `json:"bMute"`
	ID    int  `json:"id,omitempty"` // default is you, if you specify id (I think??) you can get other people
}

type AudioVoipJoinChannelRequest

type AudioVoipJoinChannelRequest struct {
	BOn *bool `json:"bOn,omitempty"`
	ID  *int  `json:"id,omitempty"`
}

TODO: refactor the whole codebase to allow for pointers when omitempty :|

type AudioVoipStatusRequest

type AudioVoipStatusRequest struct {
	OldAudioConnectionStatus int `json:"oldAudioConnectionStatus"`
	AudioConnectionStatus    int `json:"audioConnectionStatus"`
}

type BOnRequest

type BOnRequest struct {
	BOn bool `json:"bOn,omitempty"`
	ID  int  `json:"id,omitempty"` // default is you, if you specify id (I think??) you can get other people
}

TODO: merge these

type BreakoutRoomItem

type BreakoutRoomItem struct {
	BID             string   `json:"BID"`
	MeetingTitle    string   `json:"MeetingTitle"`
	MeetingToken    string   `json:"MeetingToken"`
	Status          int      `json:"Status"`
	HostID          string   `json:"HostID"`
	ParticipantList []string `json:"ParticipantList"`
}

type BytesBase64NoPadding

type BytesBase64NoPadding []byte

golang usually allows []bytes to be represented by b64 strings but zoom sends them with no padding which breaks it so this is a custom type to allow for lack of padding

func (BytesBase64NoPadding) MarshalJSON

func (b BytesBase64NoPadding) MarshalJSON() ([]byte, error)

func (*BytesBase64NoPadding) UnmarshalJSON

func (b *BytesBase64NoPadding) UnmarshalJSON(data []byte) error

type CallOutCountry

type CallOutCountry []struct {
	Code string `json:"code"`
	Name string `json:"name"`
	ID   string `json:"id"`
}

type CallOutCountryAlias

type CallOutCountryAlias CallOutCountry

func (*CallOutCountryAlias) UnmarshalJSON

func (m *CallOutCountryAlias) UnmarshalJSON(data []byte) error

type ConferenceAllowParticipantRenameRequest

type ConferenceAllowParticipantRenameRequest BOnRequest

type ConferenceAllowUnmuteAudioRequest

type ConferenceAllowUnmuteAudioRequest BOnRequest

type ConferenceAllowUnmuteVideoRequest

type ConferenceAllowUnmuteVideoRequest BOnRequest

type ConferenceAttributeIndication

type ConferenceAttributeIndication map[string]interface{}

type ConferenceAvatarPermissionChanged

type ConferenceAvatarPermissionChanged struct {
	BAllowedAvatar bool `json:"bAllowedAvatar"`
}

type ConferenceBreakoutRoomAttributeIndication

type ConferenceBreakoutRoomAttributeIndication struct {
	Proto ConferenceBreakoutRoomAttributeIndicationDataAlias `json:"proto"`
}

type ConferenceBreakoutRoomAttributeIndicationData

type ConferenceBreakoutRoomAttributeIndicationData struct {
	ControlStatus              int                `json:"ControlStatus"`
	NameIndex                  int                `json:"NameIndex"`
	IsAutoJoinEnabled          bool               `json:"IsAutoJoinEnabled"`
	IsBackToMainSessionEnabled bool               `json:"IsBackToMainSessionEnabled"`
	IsTimerEnabled             bool               `json:"IsTimerEnabled"`
	TimerDuration              int                `json:"TimerDuration"`
	IsTimerAutoEndEnabled      bool               `json:"IsTimerAutoEndEnabled"`
	WaitSeconds                int                `json:"WaitSeconds"`
	StartTimeOnMMR             interface{}        `json:"StartTimeOnMMR"`
	ItemList                   []BreakoutRoomItem `json:"ItemList"`
}

type ConferenceBreakoutRoomAttributeIndicationDataAlias

type ConferenceBreakoutRoomAttributeIndicationDataAlias ConferenceBreakoutRoomAttributeIndicationData

func (ConferenceBreakoutRoomAttributeIndicationDataAlias) MarshalJSON

func (*ConferenceBreakoutRoomAttributeIndicationDataAlias) UnmarshalJSON

type ConferenceBreakoutRoomBroadcastRequest

type ConferenceBreakoutRoomBroadcastRequest struct {
	TextContent BytesBase64NoPadding `json:"textContent"`
}

type ConferenceBreakoutRoomCommandIndication

type ConferenceBreakoutRoomCommandIndication struct {
	// although this could be represented as bytesbase64nopadding data there is no point in doing so because we are not going to be anything other than copying it verbatim
	Botoken     string               `json:"botoken,omitempty"`
	CommandType string               `json:"commandType,omitempty"`
	ConfID      string               `json:"confID,omitempty"`
	RequestID   int                  `json:"requestID,omitempty"`
	TargetBID   string               `json:"targetBID,omitempty"`
	TextContent BytesBase64NoPadding `json:"textContent,omitempty"`
}

type ConferenceBreakoutRoomJoinRequest

type ConferenceBreakoutRoomJoinRequest struct {
	TargetBID string `json:"targetBID"`
}

type ConferenceBreakoutRoomJoinResponse

type ConferenceBreakoutRoomJoinResponse struct {
	Bid     string `json:"bid"`
	Botoken string `json:"botoken"`
	ConfID  string `json:"confID"`
}

type ConferenceBreakoutRoomStartRequest

type ConferenceBreakoutRoomStartRequest ConferenceBreakoutRoomAttributeIndication

start request is the same thing

type ConferenceBreakoutRoomTokenBatchRequest

type ConferenceBreakoutRoomTokenBatchRequest struct {
	Topic string `json:"topic"`
	Index int    `json:"index"`
}

type ConferenceBreakoutRoomTokenResponse

type ConferenceBreakoutRoomTokenResponse struct {
	Bid string `json:"bid"`
}

type ConferenceChatIndication

type ConferenceChatIndication struct {
	AttendeeNodeID int                  `json:"attendeeNodeID"`
	DestNodeID     int                  `json:"destNodeID"`
	SenderName     BytesBase64NoPadding `json:"senderName"`
	Text           BytesBase64NoPadding `json:"text"`
}

type ConferenceChatPrivilegeRequest

type ConferenceChatPrivilegeRequest struct {
	ChatPriviledge int `json:"chatPriviledge"`
}

type ConferenceChatRequest

type ConferenceChatRequest struct {
	DestNodeID int                  `json:"destNodeID"`
	Sn         BytesBase64NoPadding `json:"sn"`
	Text       BytesBase64NoPadding `json:"text"`
}

type ConferenceCohostChangeIndication

type ConferenceCohostChangeIndication struct {
	BCoHost bool `json:"bCoHost"`
}

type ConferenceDCRegionIndication

type ConferenceDCRegionIndication struct {
	DC      string `json:"dc"`
	Network string `json:"network"`
	Region  string `json:"region"`
}

which datacenter are you using

type ConferenceEndIndication

type ConferenceEndIndication struct {
	Reason    int `json:"reason"`
	SubReason int `json:"subReason"`
}

type ConferenceEndRequest

type ConferenceEndRequest struct{}

type ConferenceHoldChangeIndication

type ConferenceHoldChangeIndication struct {
	BHold bool `json:"bHold"`
}

type ConferenceHostChangeIndication

type ConferenceHostChangeIndication struct {
	BCoHost bool `json:"bCoHost"`
}

type ConferenceLocalRecordIndication

type ConferenceLocalRecordIndication struct{}

type ConferenceLockShareRequest

type ConferenceLockShareRequest struct {
	LockShare int `json:"lockShare"`
}

type ConferenceOptionIndication

type ConferenceOptionIndication struct {
	DestNodeID int `json:"destNodeID"`
	// although this could be represented as bytesbase64nopadding data there is no point in doing so because we are not going to be anything other than copying it verbatim
	Opt string `json:"opt"`
}

type ConferenceRenameRequest

type ConferenceRenameRequest struct {
	ID     int                  `json:"id"`
	Dn2    BytesBase64NoPadding `json:"dn2"`
	Olddn2 BytesBase64NoPadding `json:"olddn2"`
}

type ConferenceRosterIndication

type ConferenceRosterIndication struct {
	Add []struct {
		Avatar             string               `json:"avatar,omitempty"`
		BCCEditor          bool                 `json:"bCCEditor,omitempty"`
		BCanPinMultiVideo  bool                 `json:"bCanPinMultiVideo,omitempty"`
		BCapsPinMultiVideo bool                 `json:"bCapsPinMultiVideo,omitempty"`
		BGuest             bool                 `json:"bGuest,omitempty"`
		BHold              bool                 `json:"bHold,omitempty"`
		BRaiseHand         *bool                `json:"bRaiseHand,omitempty"`
		Dn2                BytesBase64NoPadding `json:"dn2,omitempty"`
		ID                 int                  `json:"id,omitempty"`
		Os                 int                  `json:"os,omitempty"`
		Role               int                  `json:"role,omitempty"`
		Type               int                  `json:"type,omitempty"`
		ZoomID             string               `json:"zoomID,omitempty"`
	} `json:"add"`
	Update []struct {
		// all these fields are optional
		Caps                  int                  `json:"caps,omitempty"`
		Dn2                   BytesBase64NoPadding `json:"dn2,omitempty"` // renames
		ID                    int                  `json:"id,omitempty"`
		Muted                 bool                 `json:"muted,omitempty"`
		BVideoOn              bool                 `json:"bVideoOn,omitempty"`
		Audio                 string               `json:"audio,omitempty"`
		AudioConnectionStatus int                  `json:"audioConnectionStatus,omitempty"`
		BAudioUnencrypted     bool                 `json:"bAudioUnencrytped,omitempty"`
		BCoHost               bool                 `json:"bCoHost,omitempty"`
		BRaiseHand            *bool                `json:"bRaiseHand,omitempty"`
		Role                  int                  `json:"role,omitempty"`
	} `json:"update"`
	Remove []struct {
		ID          int `json:"id,omitempty"`
		NUSerStatus int `json:"nUserStatus,omitempty"`
	} `json:"remove"`
}

there are many types of roster indication messages so we just omitempty everything so that we aren't sending a bunch of blank strings etc

type ConferenceSetMuteUponEntryRequest

type ConferenceSetMuteUponEntryRequest BOnRequest

type ConferenceSetShareStatusRequest

type ConferenceSetShareStatusRequest struct {
	BOnRequest
	BShareAudio bool `json:"bShareAudio"`
}

type DataChannelSendOfferToRWG

type DataChannelSendOfferToRWG struct {
	Offer string `json:"offer"`
	Type  int    `json:"type"`
}

type EncryptedRWCServersAlias

type EncryptedRWCServersAlias map[string]string

func (*EncryptedRWCServersAlias) UnmarshalJSON

func (m *EncryptedRWCServersAlias) UnmarshalJSON(data []byte) error

type GenericZoomMessage

type GenericZoomMessage struct {
	Body json.RawMessage `json:"body,omitempty"`
	Evt  int             `json:"evt"`
	Seq  uint32          `json:"seq"` // only positive - need this for atomic incrementer
}

type JoinConferenceResponse

type JoinConferenceResponse struct {
	ConID         string `json:"conID"`
	ConfID        string `json:"confID"`
	E2EEncrypt    bool   `json:"e2eEncrypt"`
	Elapsed       int    `json:"elapsed"`
	EncType       int    `json:"encType"`
	HugeBO        bool   `json:"hugeBO"`
	Mn            string `json:"mn"`
	ParticipantID int    `json:"participantID"`
	Res           int    `json:"res"`
	Role          int    `json:"role"`
	SvcURL        string `json:"svcUrl"`
	UserGUID      string `json:"userGUID"`
	UserID        int    `json:"userID"`
	ZoomID        string `json:"zoomID"`
}

type MeetingInfo

type MeetingInfo struct {
	Status       bool   `json:"status"`
	ErrorCode    int    `json:"errorCode"`
	ErrorMessage string `json:"ErrorMessage"`
	Result       struct {
		Password                string                   `json:"passWord"`
		Auth                    string                   `json:"auth"`
		IsWebinar               int                      `json:"isWebinar,string"`
		TrackAuth               string                   `json:"track_auth"`
		Sign                    string                   `json:"sign"`
		EncryptedRWC            EncryptedRWCServersAlias `json:"encryptedRWC"`
		Mid                     string                   `json:"mid"`
		MeetingTopic            string                   `json:"meetingTopic"`
		Tid                     string                   `json:"tid"`
		CcURL                   string                   `json:"ccUrl"`
		TollNumbersJSON         string                   `json:"toll_numbers_json"`
		MeetingOptions          MeetingOptionsAlias      `json:"meetingOptions"`
		IsSupportQA             bool                     `json:"isSupportQA,string"`
		CallOutCountryJSON      CallOutCountryAlias      `json:"call_out_country_json"`
		H323Password            string                   `json:"h323Password"`
		RwcAgentEndpoint        string                   `json:"rwc_agent_endpoint"`
		UserName                string                   `json:"userName"`
		InviteEmail             string                   `json:"invite_email"`
		IsOriginHost            bool                     `json:"isOriginHost,string"`
		MeetingNumber           string                   `json:"meetingNumber"`
		FormateConfno           string                   `json:"formate_confno"`
		OptionVideoHost         bool                     `json:"optionVideoHost,string"`
		SupportCallOut          int                      `json:"support_call_out,string"`
		OptionAudioType         string                   `json:"optionAudioType"`
		RwcAgentEndpointBackup  string                   `json:"rwc_agent_endpoint_backup"`
		Location                string                   `json:"location"`
		CanRecording            int                      `json:"can_recording,string"`
		OptionVideoParticipants string                   `json:"optionVideoParticipants"`
		Ts                      int64                    `json:"ts,string"`
	} `json:"result"`
}

type MeetingOptions

type MeetingOptions struct {
	IsShareWhiteboardEnabled                bool `json:"isShareWhiteboardEnabled"`
	IsChatEnabled                           bool `json:"isChatEnabled"`
	IsAllowBreakoutRoomPreAssign            bool `json:"isAllowBreakoutRoomPreAssign"`
	AllowParticipantsRename                 bool `json:"allowParticipantsRename"`
	IsShareOptionLocked                     bool `json:"isShareOptionLocked"`
	AllowPutOnHold                          bool `json:"allowPutOnHold"`
	IsEnableHideParticipantPic              bool `json:"isEnableHideParticipantPic"`
	AllowParticipantsRenameLocked           bool `json:"allowParticipantsRenameLocked"`
	IsScreenShareEnabled                    bool `json:"isScreenShareEnabled"`
	IsBO100Enabled                          bool `json:"isBO100Enabled"`
	IsPollingEnabled                        bool `json:"isPollingEnabled"`
	IsEnableMuteParticipantsUponEntry       bool `json:"isEnableMuteParticipantsUponEntry"`
	IsGroupHDEnabled                        bool `json:"isGroupHDEnabled"`
	IsEnableMeetingWatermark                bool `json:"isEnableMeetingWatermark"`
	IsAllowShareZMWindowEnabled             bool `json:"isAllowShareZMWindowEnabled"`
	IsReportParticipantsEnabled             bool `json:"isReportParticipantsEnabled"`
	IsEnableDeleteChatMsg                   bool `json:"isEnableDeleteChatMsg"`
	IsPrivateChatEnabled                    bool `json:"isPrivateChatEnabled"`
	IsUserEnableRecordingReminder           bool `json:"isUserEnableRecordingReminder"`
	IsLocalRecordingEnabled                 bool `json:"isLocalRecordingEnabled"`
	IsEnableClosedCaption                   bool `json:"isEnableClosedCaption"`
	IsAllowParticipantsReport               bool `json:"isAllowParticipantsReport"`
	IsAuthLocalRecording                    bool `json:"isAuthLocalRecording"`
	IsRemoteControlEnbaled                  bool `json:"isRemoteControlEnbaled"`
	IsInstantMeeting                        bool `json:"isInstantMeeting"`
	IsPrivateChatLocked                     bool `json:"isPrivateChatLocked"`
	IsEnableAutomaticDisplayJoinAudioDialog bool `json:"isEnableAutomaticDisplayJoinAudioDialog"`
	IsAllowChatAndRaiseChime                bool `json:"isAllowChatAndRaiseChime"`
	EnableWaitingRoom                       bool `json:"enableWaitingRoom"`
	IsMeetingScreenSharingGrabAll           bool `json:"isMeetingScreenSharingGrabAll"`
	IsChatLocked                            bool `json:"isChatLocked"`
	IsEnableLiveTranscription               bool `json:"isEnableLiveTranscription"`
	IsEnableMeetingControlToolBar           bool `json:"isEnableMeetingControlToolBar"`
	IsCOHostEnabled                         bool `json:"isCOHostEnabled"`
	IsEnableEncryption3RdParty              bool `json:"isEnableEncryption3rdParty"`
	IsShareScreenHostOnly                   bool `json:"isShareScreenHostOnly"`
	IsEnableBreakoutRoom                    bool `json:"isEnableBreakoutRoom"`
	PlayUserJoinLeaveAudio                  bool `json:"playUserJoinLeaveAudio"`
	Nonverbalfeedback                       bool `json:"nonverbalfeedback"`
	IsWaitingRoomLocked                     bool `json:"isWaitingRoomLocked"`
	IsWaterMarkLocked                       bool `json:"isWaterMarkLocked"`
}

type MeetingOptionsAlias

type MeetingOptionsAlias MeetingOptions

func (*MeetingOptionsAlias) UnmarshalJSON

func (m *MeetingOptionsAlias) UnmarshalJSON(data []byte) error

type Message

type Message interface {
}

type RwgInfo

type RwgInfo struct {
	Rwg     string `json:"rwg"`
	RwcAuth string `json:"rwcAuth"`
}

type SSRCIndication

type SSRCIndication struct {
	SSRC int `json:"ssrc"`
}

type SharingAssignedSendingSsrcResponse

type SharingAssignedSendingSsrcResponse struct {
	SSRC int `json:"ssrc"`
}

type SharingEncryptKeyIndication

type SharingEncryptKeyIndication struct {
	AdditionalType int    `json:"additionalType"`
	EncryptKey     string `json:"encryptKey"`
}

type SharingReceivingChannelCloseIndication

type SharingReceivingChannelCloseIndication struct {
	SSRC int `json:"ssrc"`
}

type SharingReceivingChannelReadyIndication

type SharingReceivingChannelReadyIndication struct {
	SSRC        int  `json:"ssrc"`
	StreamIndex int  `json:"streamIndex"`
	VideoMode   bool `json:"videoMode"`
}

WebRTC audio related

type SharingStatusIndication

type SharingStatusIndication struct {
	ActiveNodeID int `json:"activeNodeID"`
	BStatus      int `json:"bStatus"`
	Ssrc         int `json:"ssrc"`
}

type SharingSubscribeRequest

type SharingSubscribeRequest struct {
	ID   int `json:"id"`
	Size int `json:"size"`
}

type VideoActiveIndication

type VideoActiveIndication struct {
	BVideoOn bool `json:"bVideoOn"`
	ID       int  `json:"id"`
}

type VideoMuteRequest

type VideoMuteRequest BOnRequest

type VideoSubID

type VideoSubID struct {
	ID int `json:"id"`
}

type VideoSubInfo

type VideoSubInfo struct {
	ID   int  `json:"id"`
	BOn  bool `json:"bOn"`
	Size int  `json:"size"`
}

type VideoSubscribeRequest

type VideoSubscribeRequest struct {
	SubInfoList []VideoSubInfo `json:"subInfoList"`
}

{"evt":12303,"body":{"subInfoList":[{"id":16778240,"size":2,"bOn":false}]},"seq":18}

type VideoUnsubscribeRequest

type VideoUnsubscribeRequest struct {
	SubIDList []VideoSubID `json:"subIDList"`
}

{"evt":12305,"body":{"subIDList":[{"id":16778240}]},"seq":17}

type WebsocketConnectionKeepalive

type WebsocketConnectionKeepalive struct{}

type ZoomApiType

type ZoomApiType string
const (
	ZOOM_JWT_API_TYPE ZoomApiType = "jwt"
	ZOOM_SDK_API_TYPE ZoomApiType = "sdk"
)

type ZoomMeetingInfo

type ZoomMeetingInfo struct {
	MeetingNumber   string
	MeetingPassword string
}

func ParseZoomMeetingUrl

func ParseZoomMeetingUrl(meetingUrl string) (*ZoomMeetingInfo, error)

type ZoomSession

type ZoomSession struct {
	MeetingNumber   string
	MeetingPassword string
	Username        string
	HardwareID      uuid.UUID
	ZoomApiType     ZoomApiType
	ZoomApiKey      string
	ZoomApiSecret   string
	JoinInfo        *JoinConferenceResponse
	ProxyURL        *url.URL

	// RWG
	RwgInfo   *RwgInfo
	RwgCookie string
	// contains filtered or unexported fields
}

func NewZoomSession

func NewZoomSession(meetingNumber string, meetingPassword string, username string, hardwareID string, proxyURL string, zoomApiType ZoomApiType, zoomApiKey string, zoomApiSecret string) (*ZoomSession, error)

func (*ZoomSession) BreakoutRoomBroadcast

func (session *ZoomSession) BreakoutRoomBroadcast(text string) error

host required

func (*ZoomSession) CreateBreakoutRoom

func (session *ZoomSession) CreateBreakoutRoom(rooms []BreakoutRoomItem, autoJoin bool, timerEnabled bool, timerDurationSeconds int, forceLeaveWait int) error

host required request room bIDs using session.RequestBreakoutRoomToken, store them somewhere, then use those to make the rooms. see struct details in message_types.go

func (*ZoomSession) EndMeeting

func (session *ZoomSession) EndMeeting() error

host required

func (*ZoomSession) GetMeetingInfoData

func (session *ZoomSession) GetMeetingInfoData() (*MeetingInfo, string, error)

func (*ZoomSession) GetWebsocketUrl

func (session *ZoomSession) GetWebsocketUrl(meetingInfo *MeetingInfo, wasInWaitingRoom bool) (string, error)

func (*ZoomSession) JoinAudioVoipChannel

func (session *ZoomSession) JoinAudioVoipChannel(status bool) error

equivalent to zoom "join audio" - basically just allows us to have the voice icon next to our name

func (*ZoomSession) MakeWebsocketConnection

func (session *ZoomSession) MakeWebsocketConnection(onMessageFunction onMessage) error

func (*ZoomSession) MuteUser

func (session *ZoomSession) MuteUser(userId int, status bool) error

func (*ZoomSession) RaiseHand

func (session *ZoomSession) RaiseHand(id int, shouldRaise bool) error

func (*ZoomSession) RenameById

func (session *ZoomSession) RenameById(id int, oldName string, newName string) error

host required to rename others (not self)

func (*ZoomSession) RenameMe

func (session *ZoomSession) RenameMe(newName string) error

func (*ZoomSession) RequestAllMute

func (session *ZoomSession) RequestAllMute() error

host required

func (*ZoomSession) RequestBreakoutRoomJoinToken

func (session *ZoomSession) RequestBreakoutRoomJoinToken(targetBID string) error

breakout room joining is not fully implemented you have to send the WS_CONF_BO_JOIN_REQ (which this function does), wait for the WS_CONF_BO_JOIN_RES, then make a separate websocket connection using the token you get breakout rooms are basically meetings= within meetings

func (*ZoomSession) RequestBreakoutRoomToken

func (session *ZoomSession) RequestBreakoutRoomToken(topic string, index int) error

host required

func (*ZoomSession) SendChatMessage

func (session *ZoomSession) SendChatMessage(destNodeID int, text string) error

func (*ZoomSession) SendMessage

func (session *ZoomSession) SendMessage(connection *websocket.Conn, eventNumber int, body interface{}) error

func (*ZoomSession) SetAllowParticipantRename

func (session *ZoomSession) SetAllowParticipantRename(status bool) error

host required

func (*ZoomSession) SetAllowUnmuteAudio

func (session *ZoomSession) SetAllowUnmuteAudio(status bool) error

host required

func (*ZoomSession) SetAllowUnmuteVideo

func (session *ZoomSession) SetAllowUnmuteVideo(status bool) error

host required

func (*ZoomSession) SetAudioMuted

func (session *ZoomSession) SetAudioMuted(status bool) error

NOTE: this does not actually allow you to output any audio, that has yet to implemented. it just changes the indicator next to your username. true for mute, false for unmute

func (*ZoomSession) SetChatLevel

func (session *ZoomSession) SetChatLevel(status int) error

host required possible values: CHAT_EVERYONE_PUBLICLY_PRIVATELY = 1, CHAT_HOST_ONLY = 3, CHAT_NO_ONE = 4, CHAT_EVERYONE_PUBLICLY = 5

func (*ZoomSession) SetMuteUponEntry

func (session *ZoomSession) SetMuteUponEntry(status bool) error

host required

func (*ZoomSession) SetShareLockedStatus

func (session *ZoomSession) SetShareLockedStatus(status int) error

host required possible values: CMM_SHARE_SETTING_HOST_GRAB = 0 (How many participants can share at the same time? One participant can share at a time) (Who can share? All Participants) (Who can start sharing when someone else is sharing? Only Host)

CMM_SHARE_SETTING_LOCK_SHARE = 1 (How many participants can share at the same time? One participant can share at a time) (Who can share? Only Host)

CMM_SHARE_SETTING_ANYONE_GRAB = 2 (How many participants can share at the same time? One participant can share at a time) (Who can share? All Participants) (Who can start sharing when someone else is sharing? Only Host)

CMM_SHARE_SETTING_MULTI_SHARE = 3 (How many participants can share at the same time? Multiple participants can share simultaneously)

func (*ZoomSession) SetShareStatus

func (session *ZoomSession) SetShareStatus(status bool, shareAudio bool) error

NOTE: this does not actually allow you to screenshare, that has yet to implemented. it will show that you are sharing your screen but the output will be black true for mute, false for unmute

func (*ZoomSession) SetVideoMuted

func (session *ZoomSession) SetVideoMuted(status bool) error

NOTE: this does not actually allow you to screenshare, that has yet to implemented. it just changes the indicator next to your name and will show that you have solid black video true for mute, false for unmute

func (*ZoomSession) SharingSubscribeRequest

func (session *ZoomSession) SharingSubscribeRequest(id int, size int) error

func (*ZoomSession) SignalAudioStatus

func (session *ZoomSession) SignalAudioStatus(oldAudioConnectionStatus, audioConnectionStatus int) error

Signal that our audio channel is ready

func (*ZoomSession) VideoSubscribeRequest

func (session *ZoomSession) VideoSubscribeRequest(id int, size int) error

func (*ZoomSession) VideoUnsubscribeRequest

func (session *ZoomSession) VideoUnsubscribeRequest(id int) error

type ZoomStreams

type ZoomStreams struct {
	// contains filtered or unexported fields
}

func CreateZoomAudioStreams

func CreateZoomAudioStreams(session *ZoomSession) (*ZoomStreams, error)

func CreateZoomScreenShareStreams

func CreateZoomScreenShareStreams(session *ZoomSession) (*ZoomStreams, error)

func CreateZoomVideoStreams

func CreateZoomVideoStreams(session *ZoomSession) (*ZoomStreams, error)

func (*ZoomStreams) AddParticipant

func (streams *ZoomStreams) AddParticipant(userId int, zoomId string) error

func (*ZoomStreams) AddSsrcForParticipant

func (streams *ZoomStreams) AddSsrcForParticipant(userId int, ssrc int) error

func (*ZoomStreams) SetSharedMeetingKey

func (streams *ZoomStreams) SetSharedMeetingKey(encryptionKey string) error

func (*ZoomStreams) StartReceiveChannel

func (streams *ZoomStreams) StartReceiveChannel()

Directories

Path Synopsis
codecs
rtp
ext

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL