- Example Usage (All Methods)
- Example Usage (Host Methods)
- Method Chaining
- All Methods
- start()
- end()
- generateRoomName([prefix], [nbChars], [suffix])
- anonymizeDisplayName([prefix], [nbDigits])
- isInFuture(startDateTime)
- get('allParticipants')
- get('nbParticipants')
- get('videoQuality')
- get('avatarUrlById', participantId)
- get('displayNameById', participantId)
- get('participantById', participantId)
- getAsync('availableDevices')
- getAsync('currentDevices')
- getAsync('livestreamUrl')
- getAsync('contentSharingParticipants')
- selectDeviceAsync(type, label, id)
- checkAsync('isAudioAvailable')
- checkAsync('isVideoAvailable')
- checkAsync('isAudioDisabled')
- checkAsync('isAudioMuted')
- checkAsync('isVideoMuted')
- checkAsync('isAudioModerationOn')
- checkAsync('isVideoModerationOn')
- checkAsync('isDeviceListAvailable')
- checkAsync('isDeviceChangeAvailable')
- checkAsync('isMultipleAudioInputSupported')
- checkAsync('isParticipantsPaneOpen')
- checkAsync('isSilentModeEnabled')
- checkAsync('isParticipantAudioForceMuted', participantId)
- checkAsync('isParticipantVideoForceMuted', participantId)
- set('audioModeration', true)
- set('videoModeration', true)
- set('avatarUrl', avatarUrl)
- set('displayName', participantName)
- set('localSubject', subject)
- set('noiseSupression', true)
- set('onStageParticipant', participantId)
- set('tileView', true)
- set('followMe', true)
- set('participantVolume', participantId, volumeLevel)
- set('password', password)
- set('subject', subject)
- set('participantsPaneVisibility', true)
- exec('enableLobby', true)
- exec('hangup')
- exec('sendChatMessage', message, participantId, ignorePrivacy)
- exec('sendDataToParticipant', participantId, data)
- exec('initiatePrivateChat', participantId)
- exec('cancelPrivateChat')
- exec('muteAudioEveryone')
- exec('muteVideoEveryone')
- exec('startShareVideo', videoUrl)
- exec('stopShareVideo')
- exec('startRecording')
- exec('stopRecording')
- exec('startLiveStreaming', rtmpUrl)
- exec('stopLiveStreaming')
- exec('kickParticipant', participantId)
- exec('pinParticipant', participantId)
- exec('answerKnockingParticipant', participantId, approveEntry)
- exec('grantModerator', participantId)
- exec('approveVideo', participantId)
- exec('askToUnmute', participantId)
- exec('rejectParticipantAudio', participantId)
- exec('rejectParticipantVideo', participantId)
- execAsync('captureStageScreenshot')
- toggle('audio')
- toggle('video')
- toggle('filmStrip')
- toggle('chat')
- toggle('raiseHand')
- toggle('shareScreen')
- toggle('tileView')
- toggle('camera')
- toggle('cameraMirroring')
- toggle('virtualBackgroundDialog')
Use the ClanMeeting methods to change the meeting settings/properties dynamically while a meeting is going on.
Note: Examples on this page show how to execute the methods on meeting join. However, you can also execute these methods using custom buttons or when other events occur within the meeting.
Example Usage (All Methods) #
xxxxxxxxxx
211const meeting = new ClanMeeting(domain, consumerId, optionalProperties);
2
3window.onload = function () {
4 // Method 1
5 meeting.start();
6
7 const meetingJoinedLsnr = function meetingJoinedLsnr(eventData) {
8 // Method 2
9 console.log(meeting.get('allParticipants'));
10 // Method 3
11 meeting.set('displayName', 'ChangedName');
12 };
13 };
14
15 meeting.once('meetingJoined', meetingJoinedLsnr);
16};
17
18window.onunload = function () {
19 // Method 4
20 meeting.end();
21};
Example Usage (Host Methods) #
NOTE: If trying to call methods as soon as meeting is joined, wait for the role to be upgraded to moderator before executing methods that need host privileges as shown in the example below.
xxxxxxxxxx
281const meeting = new ClanMeeting(domain, consumerId, optionalProperties);
2// Methods 1 and 2 (chained together)
3meeting.generateRoomName().anonymizeDisplayName();
4
5window.onload = function () {
6 // Method 3
7 meeting.start();
8
9 const meetingJoinedLsnr = function meetingJoinedLsnr() {
10 const roleChangedLsnr = function roleChangedLsnr(event) {
11 // Execute host methods only AFTER the user has joined and has become the moderator
12 if (event.role === 'moderator') {
13 // Methods 4 & 5 (chained)
14 meeting
15 .exec('enableLobby', true)
16 .exec('startRecording');
17 }
18 };
19 meeting.on('roleChanged', roleChangedLsnr);
20 };
21
22 meeting.once('meetingJoined', meetingJoinedLsnr);
23};
24
25window.onunload = function () {
26 // Method 6
27 meeting.end();
28};
Method Chaining #
Few ClanMeeting methods support chaining as shown in the examples above. The ones that do are flagged as isChainable.
xxxxxxxxxx
101// Chainable
2meeting
3 .exec('enableLobby', true)
4 .exec('startRecording')
5 .set('localSubject', subject)
6 .toggle('tileView');
7
8// Not chainable
9meeting.get('nbParticipants');
10meeting.checkAsync('isAudioAvailable').then(value => { console.log(value); });
All Methods #
start() #
Starts the conference. Use on window load.
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
31window.onload = function () {
2 meeting.start();
3};
end() #
Removes all listeners and ends the conference (only for the local user).
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
31window.onunload = function () {
2 meeting.end();
3};
generateRoomName([prefix], [nbChars], [suffix]) #
Generates a complex random room name and sets the roomName
property.
If you do not set the roomName
property to a room of your choice then you must use this method BEFORE meeting.start()
.
param | type | description | isMandatory | default |
---|---|---|---|---|
prefix | String | Prefix string | false | empty |
nbChars | Number | Number of random alphanumeric characters in between the prefix and suffix | false | 10 |
suffix | String | Suffix string | false | empty |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
121// either set the roomName in optionalProperties
2const meeting = new ClanMeeting(domain, consumerId, optionalProperties);
3
4// or generate one before starting the meeting
5meeting.generateRoomName();
6// customize roomName like below if you want
7// this example generates 15 character room names
8meeting.generateRoomName('', 15, '');
9
10window.onload = function () {
11 meeting.start();
12};
anonymizeDisplayName([prefix], [nbDigits]) #
Anonymizes the displayName
of the participant. e.g. User_1234
If you do not set the displayName
property then you must use this method BEFORE meeting.start()
.
param | type | description | isMandatory | default |
---|---|---|---|---|
prefix | String | Prefix string | false | User_ |
nbDigits | Number | Number of digits after the prefix | false | 4 |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
121// either set the displayName in optionalProperties
2const meeting = new ClanMeeting(domain, consumerId, optionalProperties);
3
4// or anonymize the name before starting the meeting
5meeting.anonymizeDisplayName();
6// or customize as per need
7// examples - Batch5_123, Batch5_843
8meeting.anonymizeDisplayName('Batch5_', 3);
9
10window.onload = function () {
11 meeting.start();
12};
isInFuture(startDateTime) #
Returns true if the meeting is in the future as compared to the current time.
param | type | description | isMandatory |
---|---|---|---|
startDateTime | String | Start datetime of the scheduled meeting. Could be any Javascript datetime format. | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Boolean | false | false |
Example:
See usage in schedule meetings guide.
get('allParticipants') #
Get an array containing all participant information such as ID, display name, avatar URL, and email.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'allParticipants' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Object | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 const allParticipants = meeting.get('allParticipants');
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
get('nbParticipants') #
Get number of participants in the room.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'nbParticipants' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Number | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 const nbParticipants = meeting.get('nbParticipants');
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
get('videoQuality') #
Get current video resolution.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'videoQuality' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Number | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting.get('videoQuality');
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
get('avatarUrlById', participantId) #
Get avatarUrl for the participant.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'avatarUrlById' | true |
participantId | String | ID of the participant | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
String | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const someoneJoinedLsnr = function someoneJoinedLsnr(participant) {
5 meeting.get('avatarUrlById', participant.id);
6 };
7
8 // event is triggered when a remote participant joins the meeting
9 meeting.on('someoneJoined', someoneJoinedLsnr);
10};
get('displayNameById', participantId) #
Get display name for the participant.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'displayNameById' | true |
participantId | String | ID of the participant | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
String | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const someoneJoinedLsnr = function someoneJoinedLsnr(participant) {
5 meeting.get('displayNameById', participant.id);
6 };
7
8 // event is triggered when a remote participant joins the meeting
9 meeting.on('someoneJoined', someoneJoinedLsnr);
10};
get('participantById', participantId) #
Get participant information by participant ID.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'participantById' | true |
participantId | String | ID of the participant | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
String | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const someoneJoinedLsnr = function someoneJoinedLsnr(participant) {
5 meeting.get('participantById', participant.id);
6 };
7
8 // event is triggered when a remote participant joins the meeting
9 meeting.on('someoneJoined', someoneJoinedLsnr);
10};
getAsync('availableDevices') #
Get the list of audio and video devices available to the local participant.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'availableDevices' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Object) | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting.getAsync('availableDevices').then(devices => { console.log(devices); });
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
Response:
xxxxxxxxxx
201devices = {
2 audioInput: [{
3 deviceId: 'ID'
4 groupId: 'grpID'
5 kind: 'audioinput'
6 label: 'label'
7 }, .],
8 audioOutput: [{
9 deviceId: 'ID'
10 groupId: 'grpID'
11 kind: 'audioOutput'
12 label: 'label'
13 }, .],
14 videoInput: [{
15 deviceId: 'ID'
16 groupId: 'grpID'
17 kind: 'videoInput'
18 label: 'label'
19 }, .],
20}
getAsync('currentDevices') #
Get the list of currently selected audio/video devices for the local participant.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'currentDevices' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Object) | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting.getAsync('currentDevices').then(devices => { console.log(devices); });
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
Response:
xxxxxxxxxx
201devices = {
2 audioInput: [{
3 deviceId: 'ID'
4 groupId: 'grpID'
5 kind: 'audioinput'
6 label: 'label'
7 }, .],
8 audioOutput: [{
9 deviceId: 'ID'
10 groupId: 'grpID'
11 kind: 'audioOutput'
12 label: 'label'
13 }, .],
14 videoInput: [{
15 deviceId: 'ID'
16 groupId: 'grpID'
17 kind: 'videoInput'
18 label: 'label'
19 }, .],
20}
getAsync('livestreamUrl') #
Get the livestream URL if livestreaming is on.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'livestreamUrl' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Object) | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting.getAsync('livestreamUrl').then(data => { console.log(data); });
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
Response:
xxxxxxxxxx
31data = {
2 livestreamUrl: 'livestreamUrl'
3}
getAsync('contentSharingParticipants') #
Get the list of screen sharing participants.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'contentSharingParticipants' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Object) | false | false |
Example:
xxxxxxxxxx
91window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting.getAsync('contentSharingParticipants').then(data => { console.log(data); });
6 };
7
8 meeting.once('meetingJoined', meetingJoinedLsnr);
9};
Response:
xxxxxxxxxx
31data = {
2 sharingParticipantIds: [particId1, particId2, ]
3}
selectDeviceAsync(type, label, id) #
Once you get the device list using above methods, you can select a particular audio / video input or output device. Device list has the label and ID.
param | type | description | isMandatory |
---|---|---|---|
type | String | 'audioInput' 'audioOutput' 'videoInput' | true |
label | String | Device label | true |
id | String | Device ID | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // returns true if selected
6 meeting.selectDeviceAsync('audioInput', 'Microphone Array (Realtek Audio)', 'qndtoJUhFXtLampWZ3tLfObK7/yovEm7/G8XZmQvT/g=', ).then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
Response:
xxxxxxxxxx
21value = true or false
2// based on if the device was selected successfully
checkAsync('isAudioAvailable') #
Is audio available?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isAudioAvailable' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isAudioAvailable').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isVideoAvailable') #
Is video available?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isVideoAvailable' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isVideoAvailable').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isAudioDisabled') #
Is audio disabled?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isAudioDisabled' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isAudioDisabled').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isAudioMuted') #
Is microphone muted?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isAudioMuted' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isAudioMuted').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isVideoMuted') #
Is video muted?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isVideoMuted' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isVideoMuted').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isAudioModerationOn') #
Whether host can mute/ ask to unmute other participants.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isAudioModerationOn' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isAudioModerationOn').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isVideoModerationOn') #
Is host allowed to turn off the camera of remote participants?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isVideoModerationOn' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isVideoModerationOn').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isDeviceListAvailable') #
Is device list available?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isDeviceListAvailable' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isDeviceListAvailable').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isDeviceChangeAvailable') #
Is device change available?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isDeviceChangeAvailable' | true |
deviceType | String | 'output' 'input' | false |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isDeviceChangeAvailable', 'input').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isMultipleAudioInputSupported') #
Are multiple audio inputs supported?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isMultipleAudioInputSupported' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isMultipleAudioInputSupported').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isParticipantsPaneOpen') #
Is the side participant pane open?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isParticipantsPaneOpen' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isParticipantsPaneOpen').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isSilentModeEnabled') #
Is silent mode enabled? Audio from remote participants is disabled when in silent mode.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isSilentModeEnabled' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isSilentModeEnabled').then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isParticipantAudioForceMuted', participantId) #
Is audio for this participant muted by host?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isParticipantAudioForceMuted' | true |
participantId | String | ID of the participant | false |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isParticipantAudioForceMuted', participant.id).then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
checkAsync('isParticipantVideoForceMuted', participantId) #
Is video for this participant muted by host?
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'isParticipantVideoForceMuted' | true |
participantId | String | ID of the participant | false |
returns | needsHostPrivilege | isChainable |
---|---|---|
Promise (Boolean) | false | false |
Example:
xxxxxxxxxx
101window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 // value could be true or false
6 meeting.checkAsync('isParticipantVideoForceMuted', participant.id).then(value => { console.log(value); });
7 };
8
9 meeting.once('meetingJoined', meetingJoinedLsnr);
10};
set('audioModeration', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'audioModeration' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
xxxxxxxxxx
201// host methods
2window.onload = function () {
3 meeting.start();
4
5 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
6 const roleChangedLsnr = function roleChangedLsnr(event) {
7 if (event.role === 'moderator') {
8 meeting
9 .set('followMe', true)
10 .set('password', 'mysecret680')
11 .set('subject', 'Subject')
12 .set('audioModeration', false)
13 .set('videoModeration', false);
14 }
15 };
16 meeting.on('roleChanged', roleChangedLsnr);
17 };
18
19 meeting.once('meetingJoined', meetingJoinedLsnr);
20};
set('videoModeration', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'videoModeration' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
set('avatarUrl', avatarUrl) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'avatarUrl' | true |
avatarUrl | String | Link to compressed avatar image | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
161window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting
6 .set('avatarUrl', 'https://path/to/compressed/avatar/image')
7 .set('displayName', 'John Doe')
8 .set('localSubject', 'Local Subject')
9 .set('onStageParticipant', participant.id)
10 .set('tileView', false)
11 .set('participantsPaneVisibility', true)
12 .set('noiseSupression', false);
13 };
14
15 meeting.once('meetingJoined', meetingJoinedLsnr);
16};
set('displayName', participantName) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'displayName' | true |
participantName | String | New display name | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
set('localSubject', subject) #
Local subject is visible to the local participant only and can be used to set different meeting subjects for different participants.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'localSubject' | true |
subject | String | Meeting subject | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
set('noiseSupression', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'noiseSupression' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
set('onStageParticipant', participantId) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'onStageParticipant' | true |
participantId | String | ID of the participant | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
set('tileView', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'tileView' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
set('followMe', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'followMe' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
set('participantVolume', participantId, volumeLevel) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'participantVolume' | true |
participantId | String | ID of the participant | true |
volumeLevel | Float | Volume between 0 and 1 | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
Sets participant volume to 20% as soon as any participant joins.
xxxxxxxxxx
191window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 const roleChangedLsnr = function roleChangedLsnr(event) {
6 if (event.role === 'moderator') {
7
8 const someoneJoinedLsnr = function someoneJoinedLsnr(participant) {
9 meeting.set('participantVolume', participant.id, 0.2);
10 };
11 // whenever any remote participant joins
12 meeting.on('someoneJoined', someoneJoinedLsnr);
13 }
14 };
15 meeting.on('roleChanged', roleChangedLsnr);
16 };
17
18 meeting.once('meetingJoined', meetingJoinedLsnr);
19};
set('password', password) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'password' | true |
password | String | Password for the meeting | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
set('subject', subject) #
This is a host privilege which sets the subject for all unlike localSubject.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'subject' | true |
subject | String | Meeting subject | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
set('participantsPaneVisibility', true) #
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'participantsPaneVisibility' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('enableLobby', true) #
Enable lobby for the meeting.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'enableLobby' | true |
value | Boolean | true or false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
xxxxxxxxxx
281// host methods
2window.onload = function () {
3 meeting.start();
4
5 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
6 const roleChangedLsnr = function roleChangedLsnr(event) {
7 if (event.role === 'moderator') {
8 meeting
9 .exec('enableLobby', true)
10 .exec('startLiveStreaming', 'rtmp://url:1935/live/rtmp_key')
11 .exec('stopLiveStreaming')
12 .exec('startRecording')
13 .exec('stopRecording')
14 .exec('kickParticipant', '9713d834')
15 .exec('grantModerator', '9713d834')
16 .exec('muteAudioEveryone')
17 .exec('muteVideoEveryone')
18 .exec('approveVideo', '9713d834')
19 .exec('askToUnmute', '9713d834')
20 .exec('rejectParticipantAudio', '9713d834')
21 .exec('rejectParticipantVideo', '9713d834')
22 }
23 };
24 meeting.on('roleChanged', roleChangedLsnr);
25 };
26
27 meeting.once('meetingJoined', meetingJoinedLsnr);
28};
exec('hangup') #
Hang up the local participant only. DOES NOT end the meeting for everyone.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'hangup' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
171window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting
6 .exec('hangup')
7 .exec('pinParticipant', '9713d834')
8 .exec('startShareVideo', 'https://www.youtube.com/watch?v=BHACKCNDMW8')
9 .exec('stopShareVideo')
10 .exec('sendChatMessage', 'Hi', '', false)
11 .exec('sendDataToParticipant', '9713d834', 'text')
12 .exec('initiatePrivateChat', '3533e6b2')
13 .exec('cancelPrivateChat')
14 };
15
16 meeting.once('meetingJoined', meetingJoinedLsnr);
17};
exec('sendChatMessage', message, participantId, ignorePrivacy) #
Send a chat message to a specific participant or to everyone in the meeting.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'sendChatMessage' | true |
message | String | Chat message | true |
participantId | String | ID of receiving participant, if empty string is sent, message is sent to everyone | true |
ignorePrivacy | Boolean | true if the privacy notification should be ignored. Defaults to false | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('sendDataToParticipant', participantId, data) #
Used to transfer data between participants.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'sendDataToParticipant' | true |
participantId | String | ID of receiving participant | true |
data | Any | String, object or any acceptable data format | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('initiatePrivateChat', participantId) #
Initiate a private chat with one of the participants.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'initiatePrivateChat' | true |
participantId | String | participant ID | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('cancelPrivateChat') #
Cancel private chat if ongoing.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'cancelPrivateChat' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('muteAudioEveryone') #
Mute audio for all participants as a host.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'muteAudioEveryone' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('muteVideoEveryone') #
Turn off camera of all participants as a host.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'muteVideoEveryone' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('startShareVideo', videoUrl) #
Start sharing a video using its public URL. Videos will be visible to the participants in real time without any lag.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'startShareVideo' | true |
videoUrl | String | A YouTube video URL for example | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('stopShareVideo') #
Stop the video being shared.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'stopShareVideo' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('startRecording') #
Start video recording. Note that this is an add on and might cost you extra based on your usage. Check our pricing page for more details.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'startRecording' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('stopRecording') #
Stop ongoing video recording.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'stopRecording' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('startLiveStreaming', rtmpUrl) #
Start live streaming to your platform of choice e.g. YouTube Channel using RTMP URL. See the steps on how to find your RTMP URL here. Note that this is an add on and might cost you extra based on your usage. Check our pricing page for more details.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'startLiveStreaming' | true |
rtmpUrl | String | URL for live streaming | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('stopLiveStreaming') #
Stop ongoing live streaming.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'stopLiveStreaming' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('kickParticipant', participantId) #
Kick a participant out of the meeting as a host.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'kickParticipant' | true |
participantId | String | participant to be kicked | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('pinParticipant', participantId) #
Pin a particular participant on large video (stage). That specific participant will be visible to the local user at all times on stage.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'pinParticipant' | true |
participantId | String | participant to be pinned on stage | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
exec('answerKnockingParticipant', participantId, approveEntry) #
Automatically allow participant to join even if lobby is enabled.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'answerKnockingParticipant' | true |
participantId | String | participant to be allowed or rejected entry | true |
approveEntry | Boolean | true to approve or false to reject | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
xxxxxxxxxx
41// host command
2meeting.on('someoneKnocked', function (data) {
3 meeting.exec('answerKnockingParticipant', data.participant.id, true);
4});
exec('grantModerator', participantId) #
Grant host privileges to a participant.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'grantModerator' | true |
participantId | String | participant to be made moderator | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('approveVideo', participantId) #
If video moderation is on it approves the participant with the given ID for video.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'approveVideo' | true |
participantId | String | participant to be allowed | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('askToUnmute', participantId) #
Ask the participant with the given ID to unmute. If audio moderation is on it also approves the participant for audio.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'askToUnmute' | true |
participantId | String | participant to be notified and approved | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('rejectParticipantAudio', participantId) #
Rejects the participant with the given ID from moderation of audio.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'rejectParticipantAudio' | true |
participantId | String | participant to be rejected | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
exec('rejectParticipantVideo', participantId) #
Rejects the participant with the given ID from moderation of video.
param | type | description | isMandatory |
---|---|---|---|
command | String | 'rejectParticipantVideo' | true |
participantId | String | participant to be rejected | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | true | true |
Example:
execAsync('captureStageScreenshot') #
param | type | description | isMandatory |
---|---|---|---|
command | String | captureStageScreenshot | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('audio') #
Toggle microphone on or off.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'audio' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
xxxxxxxxxx
191window.onload = function () {
2 meeting.start();
3
4 const meetingJoinedLsnr = function meetingJoinedLsnr(participant) {
5 meeting
6 .toggle('audio')
7 .toggle('video')
8 .toggle('filmStrip')
9 .toggle('chat')
10 .toggle('raiseHand')
11 .toggle('shareScreen')
12 .toggle('tileView')
13 .toggle('camera')
14 .toggle('cameraMirroring')
15 .toggle('virtualBackgroundDialog');
16 };
17
18 meeting.once('meetingJoined', meetingJoinedLsnr);
19};
toggle('video') #
Toggle camera on or off.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'video' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('filmStrip') #
Toggle filmstrip on the right that has the thumbnails of all the participants.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'filmStrip' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('chat') #
Toggle chat on the left.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'chat' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('raiseHand') #
Raise or lower hand.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'raiseHand' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('shareScreen') #
Toggle screen sharing on or off.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'shareScreen' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('tileView') #
Toggle tileview on or off.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'tileView' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('camera') #
Switch between front and back camera on mobile.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'camera' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('cameraMirroring') #
Flip (mirror) or don't flip participant local video.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'cameraMirroring' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |
Example:
toggle('virtualBackgroundDialog') #
Toggle virtual background dialog box.
param | type | description | isMandatory |
---|---|---|---|
attribute | String | 'virtualBackgroundDialog' | true |
returns | needsHostPrivilege | isChainable |
---|---|---|
ClanMeeting | false | true |