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
__namedParametersrequired
object
micEnabledrequired
boolean
webcamEnabledrequired
boolean
namerequired
string
meetingIdrequired
string
redirectOnLeaverequired
string
Redirection URLchatEnabledrequired
boolean
screenShareEnabledrequired
boolean
pollEnabledrequired
boolean
whiteboardEnabledrequired
boolean
participantCanToggleSelfWebcamrequired
boolean
participantCanToggleSelfMicrequired
boolean
raiseHandEnabledrequired
boolean
apiKeyrequired
string
containerIdrequired
string
Specify id of the container where you want to display prebuilt UI or keep it nullrecordingEnabledoptional
boolean
recordingWebhookUrloptional
string
recordingAWSDirPathoptional
string
autoStartRecordingoptional
boolean
brandingEnabledoptional
boolean
brandLogoURLoptional
string
brandNameoptional
string
poweredByoptional
boolean
participantCanLeaveoptional
boolean
livestreamoptional
object
autoStartoptional
boolean
outputsoptional
Array<{url: string, streamKey: string}>
permissionsoptional
object
askToJoinoptional
boolean
toggleParticipantMicoptional
boolean
toggleParticipantWebcamoptional
boolean
toggleParticipantScreenshareoptional
boolean
drawOnWhiteboardoptional
boolean
toggleWhiteboardoptional
boolean
toggleRecordingoptional
boolean
joinScreenoptional
object
visibleoptional
boolean
titleoptional
string
meetingUrloptional
string
leftoptional
object
actionButtonoptional
boolean
labeloptional
string
hrefoptional
string
maxResolutionoptional
string
debugoptional
boolean
notificationSoundEnabledoptional
string
Properties
Got a Question? Ask us on discord