VideoConference API Reference
The Video Huddle component enables you to integrate reliable video huddle into your web application.
How to use
To initialize the Video Huddle component, you can follow our quickstart guide.
Properties
The Video Conference properties can be divided into four contexts: layout, presence controls, behavior, and 3D plugins. Please find below the available parameters:
Layout and languages
Here are properties that influence the visual layout and positioning of elements within the component. It includes settings for the offset, camera positioning, and color scheme.
Name | Type | Description |
---|---|---|
styles | string | Optional custom CSS styles to be applied to the component. This allows for customization of the component's appearance. |
collaborationMode | CollaborationMode | In this object you can configure how to position the Video Conference and modals experience, allowing the participants to act with other collaboration tools. |
language | string | The language property sets the default language for the meeting interface.While it's possible to change it to a custom language, it's important to remember that you'll need to include this custom language in the list of available locales for it to take effect. Default value: en |
locales | Locale[] | The locales property allows you to expand language options beyond the default English. Use this field to provide a list of languages available in the meeting overlay. |
offset | Offset | Position the iframe of the video conference by passing top, bottom, left and right. Default value: {0, 0, 0, 0} |
participantType | ParticipantType | This object is used to assign appropriate participant permissions within the room. Options are host , guest , and audience . Default value: guest |
Behavior
The behavior properties control the component's operational characteristics. These properties dictate behaviors such as turning off camera feeds, disabling screen sharing, and the use of chat.
Name | Type | Description |
---|---|---|
callbacks | object | This object allows you to define a range of callbacks to handle specific interactions within the meeting. See more about it in the callbacks section. |
allowGuests | boolean | When set to true , this flag removes all users from the meeting one minute after the host leaves and there are no other users who can take on the host role. Default value: false |
camsOff | boolean | Disables the participant's camera and hides the cameras of other participants in the room. Default value: false |
chatOff | boolean | Disables chat for the participant. Default value: false |
defaultToolbar | boolean | When set as false, this will remove the toolbar that contains options to open modals like chat, settings, share screen, open or close camera and microphone, and the "leave" button. Default value: true |
devices | DevicesOptions | With this field, you can disable participant-specific devices such as video input, audio input and output options when joining the meeting. |
screenshareOff | boolean | Disables screen sharing for the participant. Default value: false |
skipMeetingSettings | boolean | Decides whether to bypass the default meeting setup screen and immediately join a meeting. When set as true, participants will enter the meeting with their cameras and microphones disabled. Default value: false |
enableRecording | boolean | This will enable the recording feature during the meeting. Default value: true |
canShowAudienceList | boolean | When set as true, this will show the audience list in the meeting. Default value: true |
Presence controls
Presence control properties allow you to manage features related to participant interaction and engagement. These properties include options for enabling features like GoTo, Follow, and Gather functionality.
Name | Type | Description |
---|---|---|
enableFollow | boolean | When set true, enables the Follow functionality, allowing participants to follow the leader in the 3D model. Default value: false |
enableGather | boolean | When set true, enables the Gather functionality, which aligns all participants' views with the host's, ensuring a shared perspective with a single click. Default value: false |
enableGoTo | boolean | When set true , enables the GoTo functionality, allowing participants to quickly jump to another's position in the 3D model by clicking on their webcam, facilitating quick location of participants.Default value: false |
These controls are only useful if you are utilizing any of the 3D Presence plugins like Autodesk Viewer, Matterport, or Three.js.
3D plugins
These properties are related to the incorporation of 3D elements within the component. It includes options for default avatars and using a custom avatar per participant.
Name | Type | Description |
---|---|---|
avatars | Avatar[] | Provide your own custom avatars to the participant. |
defaultAvatars | boolean | Enables the "Choose Avatar" step during the meeting setup. This step is automatically hidden if a participant has an avatar attached in the SDK initialization. Default value: false |
These controls are only useful if you are utilizing any of the 3D Presence plugins like Autodesk Viewer, Matterport, or Three.js.
Events
The Video Conference in SuperViz SDK offers a range of events that allow you to monitor and respond to several interactions and changes within the meeting. These events provide valuable insights into participant actions, meeting state transitions, and more.
DESTROY
The DESTROY
event will be dispatched when the room.removeComponent()
is used or when the participant leaves the meeting room.
Here is an implementation on how to catch the dispatched event:
- JavaScript
- TypeScript
video.subscribe('destroy', onDestroy);
function onDestroy() {
// do something
}
video.subscribe(MeetingEvent.DESTROY, onDestroy);
function onDestroy() {
// do something
}
MEETING_DEVICES_CHANGE
The MEETING_DEVICES_CHANGE
event is triggered when there is a change in the local participant device list. E.g. This event will be triggered when the participant connects a headphone on the laptop.
Here is an implementation on how to catch the dispatched event:
- JavaScript
- TypeScript
video.subscribe('meeting.devices-change', onDevicesChanges);
function onDevicesChanges(payload) {
// do something
}
video.subscribe(MeetingEvent.MEETING_DEVICES_CHANGE, onDevicesChanges);
function onDevicesChanges(payload) {
// do something
}
On the callback function, you will receive the following argument:
Type | Description |
---|---|
DeviceEvent | Represents the status of the devices available for the local participant. |
MEETING_CONNECTION_STATUS_CHANGE
The MEETING_CONNECTION_STATUS_CHANGE
event is triggered when there is a change in the connection status of the participant in the meeting. This event provides real-time updates about the quality and availability of the audio/video service.
By monitoring this event and interpreting the status values, you can implement responsive actions, such as advising participants to turn off video in case of a BAD
connection or handling reconnection scenarios when LOST_CONNECTION
occurs.
You can check the possible values for connection status in the end of the page.
Here is an implementation on how to catch the dispatched event:
- JavaScript
- TypeScript
video.subscribe('meeting.connection-status-change', onConnectionStatusChange);
function onConnectionStatusChange(status) {
// do something
}
video.subscribe(MeetingEvent.MEETING_CONNECTION_STATUS_CHANGE, onConnectionStatusChange);
function onConnectionStatusChange(status) {
// do something
}
On the callback function, you will receive the following argument:
Type | Description |
---|---|
MeetingConnectionStatus | Represents the updated connection status of the Video Conference meeting. |
MEETING_NO_HOST_AVAILABLE
The MEETING_NO_HOST_AVAILABLE
event will be triggered when a guest or audience member enters the meeting, but there’s no host available yet.
If a host is the first to enter the meeting the event won’t be dispatched.
Here is an implementation on how to catch the dispatched event:
- JavaScript
- TypeScript
video.subscribe('meeting.no-host-available', onNoHostAvaliable);
function onNoHostAvaliable() {
// do something
}
video.subscribe(MeetingEvent.MEETING_NO_HOST_AVAILABLE , onNoHostAvaliable);
function onNoHostAvaliable() {
// do something
}
MEETING_HOST_AVAILABLE
The MEETING_HOST_AVAILABLE
event will be triggered when the host enters the meeting after guests and audience members have already joined.
If a host is the first to enter the meeting the event won't be dispatched.
Here is an implementation on how to catch the dispatched event:
- JavaScript
- TypeScript
video.subscribe('meeting.host-available', onHostAvailable);
function onHostAvailable() {
// do something
}
video.subscribe(MeetingEvent.MEETING_HOST_AVAILABLE, onHostAvailable);
function onHostAvailable() {
// do something
}