Methods

methods

Use the ClanMeeting methods to change the meeting settings/properties dynamically while a meeting is going on.

 

Example Usage (All Methods)

 

Example Usage (Host Methods)

Wait for the role to be upgraded to moderator before executing methods that need host privileges.

 

Method Chaining

Few ClanMeeting methods support chaining as shown in the examples above. The ones that do are flagged as isChainable.

 

All Methods

 

 

start()

Starts the conference. Use on window load.

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example:

 

 

end()

Removes all listeners and ends the conference (only for the local user).

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example:

 

 

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().

 

paramtypedescriptionisMandatorydefault
prefixStringPrefix stringfalseempty
nbCharsNumberNumber of random alphanumeric characters in between the prefix and suffixfalse10
suffixStringSuffix stringfalseempty

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example:

 

 

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().

 

paramtypedescriptionisMandatorydefault
prefixStringPrefix stringfalseUser_
nbDigitsNumberNumber of digits after the prefixfalse4

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example:

 

 

isInFuture(startDateTime)

Returns true if the meeting is in the future as compared to the current time.

 

paramtypedescriptionisMandatory
startDateTimeStringStart datetime of the scheduled meeting. Could be any Javascript datetime format.true

 

returnsneedsHostPrivilegeisChainable
Booleanfalsefalse

 

Example:

See usage in schedule meetings guide.

 

 

get(attribute, [arg])

Returns value of the requested attribute.

 

paramtypedescriptionisMandatory
attributeStringallParticipants
nbParticipants
videoQuality
avatarUrlById
displayNameById
participantById
true
argAnyArguments if applicable to the attributedepends on attr

 

returnsneedsHostPrivilegeisChainable
Anyfalsefalse

 

Example:

 

 

getAsync(attribute)

Returns a promise of response for a requested attribute.

 

paramtypedescriptionisMandatory
attributeStringavailableDevices
currentDevices
contentSharingParticipants
livestreamUrl
true

 

returnsneedsHostPrivilegeisChainable
Promisefalsefalse

 

Example:

 

 

selectDeviceAsync(type, label, id)

Once you get the device list using above methods, you can select a particular AV input or output device. Device list has the label and ID.

 

paramtypedescriptionisMandatory
typeStringaudioInput
audioOutput
videoInput
true
labelStringDevice labeltrue
idStringDevice IDtrue

 

returnsneedsHostPrivilegeisChainable
Promise – Whether the device was selected successfully.falsefalse

 

Example:

 

 

checkAsync(info, [arg])

Returns the status for the information requested.

 

paramtypedescriptionisMandatory
attributeStringisAudioAvailable
isAudioMuted
isDeviceListAvailable
isMultipleAudioInputSupported
isVideoAvailable
isVideoMuted
isDeviceChangeAvailable
true
argAnyArgument if applicable to the attributedepends on info

 

returnsneedsHostPrivilegeisChainable
Promisefalsefalse

 

Example:

 

 

set(attribute, [arg2, [arg3])

Sets the attribute to the value.

 

paramtypedescriptionisMandatory
attributeStringavatarUrl
displayName
localSubject
onStageParticipant
tileView
followMe (host)
participantVolume (host)
password (host)
subject (host)
true
arg2AnyArgument if applicable to the attributedepends on attr
arg3AnyArgument if applicable to the attributedepends on attr

 

returnsneedsHostPrivilegeisChainable
ClanMeetingtrue (some)true

 

Example:

 

 

exec(command, [arg2, [arg3, [arg4]]])

Executes the command.

 

paramtypedescriptionisMandatory
commandStringenableLobby (host)
hangup
sendChatMessage
initiatePrivateChat
cancelPrivateChat
muteAudioEveryone (host)
muteVideoEveryone (host)
startShareVideo
stopShareVideo
startRecording (host)
stopRecording (host)
startLiveStreaming (host)
stopLiveStreaming (host)
kickParticipant (host)
pinParticipant
answerKnockingParticipant (host)
true
arg2AnyArgument if applicable to the commanddepends on command
arg3AnyArgument if applicable to the commanddepends on command
arg4AnyArgument if applicable to the commanddepends on command

 

returnsneedsHostPrivilegeisChainable
ClanMeetingtrue (some)true

 

Example:

 

 

execAsync(command)

 

paramtypedescriptionisMandatory
commandStringcaptureStageScreenshottrue

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example:

 

 

toggle(attribute)

Toggles.

 

paramtypedescriptionisMandatory
attributeStringaudio
video
filmStrip
chat
raiseHand
shareScreen
tileView
camera
cameraMirroring
virtualBackgroundDialog
true

 

returnsneedsHostPrivilegeisChainable
ClanMeetingfalsetrue

 

Example: