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 participant'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
objectmicEnabledrequired
booleanwebcamEnabledrequired
booleannamerequired
stringmeetingIdrequired
stringredirectOnLeaverequired
stringRedirection URLchatEnabledrequired
booleanscreenShareEnabledrequired
booleanpollEnabledrequired
booleanwhiteboardEnabledrequired
booleanparticipantCanToggleSelfWebcamrequired
booleanparticipantCanToggleSelfMicrequired
booleanraiseHandEnabledrequired
booleanapiKeyrequired
stringcontainerIdrequired
stringSpecify id of the container where you want to display prebuilt UI or keep it nullrecordingEnabledoptional
booleanrecordingWebhookUrloptional
stringrecordingAWSDirPathoptional
stringautoStartRecordingoptional
booleanbrandingEnabledoptional
booleanbrandLogoURLoptional
stringbrandNameoptional
stringpoweredByoptional
booleanparticipantCanLeaveoptional
booleanlivestreamoptional
objectautoStartoptional
booleanoutputsoptional
Array<{url: string, streamKey: string}>
permissionsoptional
objectaskToJoinoptional
booleantoggleParticipantMicoptional
booleantoggleParticipantWebcamoptional
booleantoggleParticipantScreenshareoptional
booleandrawOnWhiteboardoptional
booleantoggleWhiteboardoptional
booleantoggleRecordingoptional
boolean
joinScreenoptional
objectvisibleoptional
booleantitleoptional
stringmeetingUrloptional
string
leftoptional
objectactionButtonoptional
booleanlabeloptional
stringhrefoptional
string
maxResolutionoptional
stringdebugoptional
booleannotificationSoundEnabledoptional
string
Properties
Got a Question? Ask us on discord

