Skip to main content

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

  • __namedParametersrequiredobject

      Properties
    • meetingIdrequiredstring

    • participantIdoptionalstring

    • nameoptionalstring

    • micEnabledoptionalbool(default:true)

    • webcamEnabledoptionalbool(default:true)

    • maxResolutionoptionalstring(default:hd)

      Possible values are hd and sd

Properties

  • __propertiesobject

      Properties
    • idstring

    • activeSpeakerIdstring

    • activePresenterIdstring

    • mainParticipantIdstring

    • localParticipantParticipant

    • participantsMap<string, Participant>

    • pinnedParticipantsMap<string, { cam: bool, share: bool }}>

    • messagesArray<{senderId: string, text: string, timestamp: number}>

Events

  • __events

      Events
    • participant-joinedevent

    • participant-leftevent

    • speaker-changedevent

    • presenter-changedevent

    • main-participant-changedevent

    • entry-requestedevent

    • entry-respondedevent

    • recording-startedevent

    • recording-stoppedevent

    • chat-messageevent

    • video-state-changedevent

    • video-seekedevent

    • livestream-startedevent

    • livestream-stoppedevent

    • pin-state-changedevent

Methods

      Join and leave
    • join()void

    • leave()void

    • end()void

      Mic and webcam
    • muteMic()void

    • unmuteMic()void

    • disableWebcam()void

    • enableWebcam()void

      Screenshare
    • disableScreenShare()void

    • enableScreenShare()void

      Recording
    • startRecording(webhookUrl: string, awsDirPath: string)void

    • stopRecording()void

      External video
    • 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 with currentTime

      Livestream / RTMP out
    • startLivestream(Array<{ url: string, streamKey: string }>)void

    • stopLivestream()void

Got a Question? Ask us on discord