Meeting Class
The entry point into real-time communication SDK.
The Meeting Class​
The Meeting Class
includes methods and events for managing meetings, participants, video & audio streams, data channels and UI customization.
You don't ever need to call the Meeting Class
constructor directly. Instead use one of the factory methods.
Factory Methods​
initMeeting()​
Javascript
const meeting = VideoSDK.initMeeting({
meetingId, // required
name, // required
micEnabled, // optional, default: true
webcamEnabled, // optional, default: true
maxResolution, // optional, default: "hd"
});
Parameters​
__namedParametersrequired
object
meetingIdrequired
string
participantIdoptional
string
nameoptional
string
micEnabledoptional
bool
(default:true)webcamEnabledoptional
bool
(default:true)maxResolutionoptional
string
(default:hd)Possible values are hd and sd
Properties
Properties​
__properties
object
id
string
activeSpeakerId
string
activePresenterId
string
mainParticipantId
string
localParticipant
Participant
participants
Map<string, Participant>
pinnedParticipants
Map<string, { cam: bool, share: bool }}>
messages
Array<{senderId: string, text: string, timestamp: number}>
Properties
Events​
__events
participant-joined
event
participant-left
event
speaker-changed
event
presenter-changed
event
main-participant-changed
event
entry-requested
event
entry-responded
event
recording-started
event
recording-stopped
event
chat-message
event
video-state-changed
event
video-seeked
event
livestream-started
event
livestream-stopped
event
pin-state-changed
event
Events
Methods​
join()
void
leave()
void
end()
void
Join and leave
muteMic()
void
unmuteMic()
void
disableWebcam()
void
enableWebcam()
void
Mic and webcam
disableScreenShare()
void
enableScreenShare()
void
Screenshare
startRecording(webhookUrl: string, awsDirPath: string)
void
stopRecording()
void
Recording
startVideo({ link: string })
void
Triggers
video-state-changed
event with status "started"stopVideo()
void
Triggers
video-state-changed
event with status "stopped"pauseVideo({ currentTime: number })
void
Triggers
video-state-changed
event with status "paused"resumeVideo()
void
Triggers
video-state-changed
event with status "resumed"seekVideo({ currentTime: number })
void
Triggers
video-seeked
event withcurrentTime
External video
startLivestream(Array<{ url: string, streamKey: string }>)
void
stopLivestream()
void
Livestream / RTMP out
Got a Question? Ask us on discord