Skip to main content

VideoSDKMeeting Class

The entry point into real-time communication prebuilt SDK.

The VideoSDKMeeting Class

The VideoSDKMeeting Class includes properties, methods and events to control user interface and experience of prebuilt.

Methods

init()

Javascript
const meeting = new VideoSDKMeeting();

meeting.init({
name: "John Doe",
apiKey: "YOUR API KEY", // generated from app.videosdk.live
meetingId: "milkyway", // enter your meeting id

containerId: null,
redirectOnLeave: "https://www.videosdk.live/",

micEnabled: true,
webcamEnabled: true,
participantCanToggleSelfWebcam: true,
participantCanToggleSelfMic: true,

chatEnabled: true,
screenShareEnabled: true,
pollEnabled: true,
whiteboardEnabled: true,
raiseHandEnabled: true,

recordingEnabled: true,
recordingWebhookUrl: "https://www.videosdk.live/callback",
recordingAWSDirPath: `/meeting-recordings/${meetingId}/`, // automatically save recording in this s3 path
autoStartRecording: true, // auto start recording on participant joined

brandingEnabled: true,
brandLogoURL: "https://picsum.photos/200",
brandName: "Awesome startup",
poweredBy: true,

participantCanLeave: true, // if false, leave button won't be visible

// Live stream meeting to youtube
livestream: {
autoStart: true,
outputs: [
{
url: "rtmp://x.rtmp.youtube.com/live2",
streamKey: "<STREAM KEY FROM YOUTUBE>",
},
],
},

permissions: {
askToJoin: false, // Ask joined participants for entry in meeting
toggleParticipantMic: true, // Can toggle other participant's mic
toggleParticipantWebcam: true, // Can toggle other participant's webcam
toggleParticipantScreenshare: true, // Can toggle other partcipant's screen share
drawOnWhiteboard: true, // Can draw on whiteboard
toggleWhiteboard: true, // Can toggle whiteboard
toggleVirtualBackground:true // Can toggle virtual background
toggleRecording: true, // Can toggle meeting recording
removeParticipant: true, // Can remove participant
endMeeting: true, // Can end meeting
},

joinScreen: {
visible: true, // Show the join screen ?
title: "Daily scrum", // Meeting title
meetingUrl: window.location.href, // Meeting joining url
},

pin: {
allowed: true, // participant can pin any participant in meeting
layout: "SPOTLIGHT", // meeting layout - GRID | SPOTLIGHT | SIDEBAR
},

leftScreen: {
// visible when redirect on leave not provieded
actionButton: {
// optional action button
label: "Video SDK Live", // action button label
href: "https://videosdk.live/", // action button href
},
},

notificationSoundEnabled: true,

debug: true, // pop up error during invalid config or netwrok error

maxResolution: "sd", // "hd" or "sd"
});

Parameters

  • __namedParametersrequiredobject

      Properties
    • micEnabledrequiredboolean

    • webcamEnabledrequiredboolean

    • namerequiredstring

    • meetingIdrequiredstring

    • redirectOnLeaverequiredstring

      Redirection URL
    • chatEnabledrequiredboolean

    • screenShareEnabledrequiredboolean

    • pollEnabledrequiredboolean

    • whiteboardEnabledrequiredboolean

    • participantCanToggleSelfWebcamrequiredboolean

    • participantCanToggleSelfMicrequiredboolean

    • raiseHandEnabledrequiredboolean

    • apiKeyrequiredstring

    • containerIdrequiredstring

      Specify id of the container where you want to display prebuilt UI or keep it null
    • recordingEnabledoptionalboolean

    • recordingWebhookUrloptionalstring

    • recordingAWSDirPathoptionalstring

    • autoStartRecordingoptionalboolean

    • brandingEnabledoptionalboolean

    • brandLogoURLoptionalstring

    • brandNameoptionalstring

    • poweredByoptionalboolean

    • participantCanLeaveoptionalboolean

    • livestreamoptionalobject

      • autoStartoptionalboolean

      • outputsoptionalArray<{url: string, streamKey: string}>

    • permissionsoptionalobject

      • askToJoinoptionalboolean

      • toggleParticipantMicoptionalboolean

      • toggleParticipantWebcamoptionalboolean

      • toggleParticipantScreenshareoptionalboolean

      • drawOnWhiteboardoptionalboolean

      • toggleWhiteboardoptionalboolean

      • toggleRecordingoptionalboolean

    • joinScreenoptionalobject

      • visibleoptionalboolean

      • titleoptionalstring

      • meetingUrloptionalstring

    • leftoptionalobject

      • actionButtonoptionalboolean

        • labeloptionalstring

        • hrefoptionalstring

    • maxResolutionoptionalstring

    • debugoptionalboolean

    • notificationSoundEnabledoptionalstring

Got a Question? Ask us on discord