webex-js-sdk

webex-js-sdk

webex

The Cisco Webex JS SDK

Install

Usage

All of the examples in these API docs assume you've gotten an authenticated Webex instance (unless otherwise specified) using one of the methods below.

webex has three basic modes of operation:

Shell Script (Quick Start)

This is the quickest way to get up and running with our JavaScript SDK. Simply set the environment variable WEBEX_ACCESS_TOKEN to your access token and add the following line at the top of your JavaScript file to get a ready-to-use instance.

You can get your WEBEX_ACCESS_TOKEN from the Cisco Webex for Developers portal.

webex/env is also a great way to get started with bots.

Browser

Our JavaScript SDK provides out-of-the-box support for the OAuth 2.0 Implicit Grant Flow.

You'll need to register an OAuth Client to get your "authorization string"

Use the steps under Bundling (or something similar) to get the SDK into your browser, then use the following JavaScript to get started:

Bundling

You'll need to bundle the SDK to use it in a web browser. Right now, we do all our SDK testing with Browserify, but our Cisco Webex Widgets use webpack.

The following snippet is the bare minimum to get our code into a form suitable for a web browser. You'll probably want to additionally pipe it through a minifier like UglifyJS before going to production.

Then, just load your bundle using:

NodeJS

Though the implicit flow is great for single page apps, it's not ideal for integrations that might need to do things on your users' behalf months in the future. We additionally support the OAuth 2.0 Authorization Code Grant flow, but due to its complexity, there's a bit you'll need to wire up in your app to take advantage of it. The following is an example of how an Express app might do authentication.

See Browser Guide and Server Guide

new Webex()
Related
Browser Guide Server Guide
Static Members
init(attrs)

Authorization

Browser support for OAuth2. Automatically parses the URL hash for an access token

new AuthorizationBrowser()
Instance Members
isAuthorizing
initiateLogin(options)
initiateImplicitGrant(options)
initiateAuthorizationCodeGrant(options)
requestAccessTokenFromJwt(options)
logout(options)

NodeJS support for OAuth2

new AuthorizationNode()
Instance Members
isAuthorizing
requestAuthorizationCodeGrant(options)
requestAccessTokenFromJwt(options)

Meetings

Maintain a cache of meetings and sync with services.

new Meetings(args: ...any)

Extends WebexPlugin

Parameters
args (...any)
Static Members
register()
unregister()
createNoiseReductionEffect
createVirtualBackgroundEffect
getReachability()
startReachability()
getPersonalMeetingRoom()
create(destination, type = null, useRandomDelayForInfo, infoExtraParams, correlationId, failOnMissingMeetingInfo, callStateForMetrics, meetingInfo = undefined, meetingLookupUrl = undefined)
getMeetingByType(type, value)
getAllMeetings()
syncMeetings(keepOnlyLocusMeetings)
sortLocusArrayToUpdate(loci)
checkHandleBreakoutLocus(newCreatedLocus)
Instance Members
personalMeetingRoom
registered
uploadLogs(options)
getLogger()
propertyName
propertyName
Events
meetings:ready
network:disconnected
meetings:registered
meeting:removed
meeting:added

Meeting is the crux of the plugin

new Meeting()
Static Members
fetchMeetingInfo(options)
verifyPassword(password, captchaCode, sendCAevents)
refreshCaptcha()
postMetrics(eventName)
invite(invitee, alertIfActive = true)
cancelPhoneInvite(invitee)
admit(memberIds, sessionLocusUrls)
remove(memberId)
mute(memberId, mute)
transfer(memberId, moderator)
getMembers()
uploadLogs(options)
closeRemoteStream()
closeRemoteStreams()
setMercuryListener()
closePeerConnections()
unsetPeerConnections()
setCorrelationId(id)
updateCallStateForMetrics(callStateForMetrics)
muteAudio()
unmuteAudio()
muteVideo()
unmuteVideo()
joinWithMedia(options)
reconnect(options)
usePhoneAudio(phoneNumber)
disconnectPhoneAudio()
moveTo(resourceId)
moveFrom(resourceId)
addMedia(options)
addMediaInternal(icePhaseCallback, turnServerInfo, forceTurnDiscovery, options)
processNextQueuedMediaUpdate
updateMedia(options)
acknowledge(type)
decline(reason)
leave(options)
startWhiteboardShare(channelUrl, resourceToken)
stopWhiteboardShare(channelUrl)
startRecording()
setMuteOnEntry(enabled)
setDisallowUnmute(enabled)
setMuteAll(mutedEnabled, disallowUnmuteEnabled, muteOnEntryEnabled)
stopRecording()
pauseRecording()
resumeRecording()
lockMeeting()
unlockMeeting()
sendDTMF(tones)
changeVideoLayout(layoutType?, renderInfo)
endMeetingForAll()
clearMeetingData
sendReaction(reactionType, skinToneType)
toggleReactions(enable)
Instance Members
callStateForMetrics
simultaneousInterpretation
annotation
receiveSlotManager
mediaRequestManagers
meetingFiniteStateMachine
mediaConnections
isMultistream
mediaProperties
networkStatus
passwordStatus
requiredCaptcha
recordingController
controlsOptionsManager
remoteMediaManager
turnDiscoverySkippedReason
turnServerUsed
getWebexObject()
isLocusCall()
correlationId
correlationId
injectMeetingInfo(meetingInfo, fetchParams, meetingLookupUrl)
refreshPermissionToken(reason?)
handleDataChannelUrlChange(datachannelUrl)
setSelfUserPolicies()
setPermissionTokenPayload(permissionToken)
unsetRemoteStreams()
cleanupLocalStreams()
isTranscriptionSupported()
isReactionsSupported()
setCaptionLanguage(language)
setSpokenLanguage(language)
startTranscription(options)
stopTranscription()
updateLLMConnection(datachannelUrl)
handleRoapFailure
roapMessageReceived
setupSdpListeners
canUpdateMedia()
buildLeaveFetchRequestOptions(options)
setRemoteQualityLevel(level)
getCurUserType()
enableMusicMode(shouldEnableMusicMode)
setSendNamedMediaGroup(mediaType, languageCode)
publishStreams(streams)
unpublishStreams(streams)
getPermissionTokenExpiryInfo()
checkAndRefreshPermissionToken(threshold, reason)
Events
meeting:stateChange
media:ready
media:stopped
meeting:ringing
meeting:ringingStop
meeting:startedSharingLocal
meeting:stoppedSharingLocal
meeting:startedSharingRemote
meeting:stoppedSharingRemote
meeting:locked
meeting:unlocked
meeting:actionsUpdate
meeting:self:unmutedByOthers
meeting:self:mutedByOthers
meeting:self:requestedToUnmute
meeting:self:guestAdmitted
meeting:self:lobbyWaiting
meeting:self:left
meeting:reconnectionStarting
meeting:reconnectionSuccess
meeting:reconnectionFailure
network:quality

Messaging

Messages are how people communicate in rooms. Each message timestamped and represented in Webex as a distinct block of content. Messages can contain plain text and a single file attachment. See the Message Attachments Guide for a list of supported media types.

new Messages()
Instance Members
listen()
listen()
create(message)
update(message, altMessage)
get(message)
list(options)
remove(message)

Resources

These are the resources provided by Webex instances for interacting with our developer API

Memberships represent a person's relationship to a room. Use this API to list members of any room that you're in or create memberships to invite someone to a room. Memberships can also be updated to make someone a moderator or deleted to remove them from the room.

new Memberships()
Instance Members
listen()
create(membership)
get(membership)
list(options)
listWithReadStatus(options)
remove(membership)
update(membership)
updateLastSeen(message)
new People()
Instance Members
get(person)
list(options, showAllTypes)

Rooms are virtual meeting places for getting stuff done. This resource represents the room itself. Check out the Memberships API to learn how to add and remove people from rooms and the Messages API for posting and managing content.

new Rooms()
Instance Members
listen()
create(room)
get(room, options)
list(options)
listWithReadStatus(maxRecent)
getWithReadStatus(roomId)
remove(room)
update(room)
new Teams()
Instance Members
create(team)
get(team, options)
list(options)
update(team)

Team Memberships represent a person's relationship to a team. Use this API to list members of any team that you're in or create memberships to invite someone to a team. Team memberships can also be updated to make someone a moderator or deleted to remove them from the team.

Just like in the Webex app, you must be a member of the team in order to list its memberships or invite people.

new TeamMemberships()
Instance Members
create(membership)
get(membership)
list(options)
remove(membership)
update(membership)

Webhooks allow your app to be notified via HTTP when a specific event occurs on Webex. For example, your app can register a webhook to be notified when a new message is posted into a specific room.

new Webhooks()
Instance Members
create(webhook)
get(webhook)
list(options)
remove(webhook)
update(webhook)

Logging

new Logger()
Instance Members
formatLogs()
LoggerConfig

Type: Object

Properties
level (string?) : Maximum log level that should be printed to the console. One of silent|error|warn|log|info|debug|trace
historyLength (number?) : Maximum number of entries to store in the log buffer.
Example
{
  level: process.env.WEBEX_LOG_LEVEL,
  historyLength: 1000
}

Types

The following typedefs describes the responses of the various API calls.

MembershipObject

Type: Object

Properties
id (string) : Unique identifier for the membership
roomId (string) : The room ID
personId (string) : The person ID
personEmail (email) : The email address of the person / room member
isModerator (boolean) : Indicates whether the specified person should be a room moderator
isMonitor (boolean) : Indicates whether the specified member is a room monitor
created (isoDate) : The date and time that this membership was created
MessageObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the message
personId (string) : The ID for the author of the message
personEmail (email) : The email for the author of the message
roomId (string) : The ID for the room of the message
text (string) : The message posted to the room in plain text
markdown (string) : The message posted to the room in markdown
files (Array<string>) : The source URL(s) for the message attachment(s). See the Message Attachments Guide for a list of supported media types.
created (isoDate) : (server generated) The date and time that the message was created
PersonObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the person
emails (Array<email>) : Email addresses of the person
displayName (string) : Display name of the person
created (isoDate) : (server generated) The date and time that the person was created
RoomObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the room
title (string) : The display name for the room. All room members will see the title so make it something good
teamId (string) : (optional) The ID of the team to which the room belongs
created (isoDate) : (server generated) The date and time that the room was created
TeamObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the team
name (string) : The name of the team
created (isoDate) : (server generated) The date and time that the team was created
TeamMembershipObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the team membership
teamId (string) : The team ID
personId (string) : The person ID
personEmail (string) : The email address of the person
isModerator (boolean) : Set to true to make the person a team moderator
created (string) : (server generated) The date and time that the team membership was created
WebhookObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the webhook
resource (string) : The resource type for the webhook
event (string) : The event type for the webhook
filter (string) : The filter that defines the webhook scope
targetUrl (string) : The URL that receives POST requests for each event
name (string) : A user-friendly name for this webhook
created (string) : (server generated) The date and time that the webhook was created

An email address, as a string.

email

Type: string

The date and time, specified in ISO 8601 extended offset date/time format (e.g. 2015-10-18T14:26:16+00:00).

isoDate

Type: string

AttachmentActionObject

Type: Object

Properties
id (string) : (server generated) Unique identifier for the attachment action
messageId (string) : The ID of the message in which attachment action is to be performed
type (string) : The type of attachment action eg., submit
inputs (Object) : The inputs for form fields in attachment message
personId (string) : (server generated) The ID for the author of the attachment action
roomId (string) : (server generated) The ID for the room of the message
created (isoDate) : (server generated) The date and time that the message was created

AttachmentActions are events that communicate information when a user clicks on an Action.Submit button in a card displayed in Webex Information conveyed in an AttachmentAction includes details about the user that clicked the button along with any card specific inputs. See the Attachments Actions API Documentation for more details

new AttachmentActions()
Instance Members
create(attachmentAction)
get(attachmentAction)

Gets a list of all recent devices associated with the user the device list gets populated from Redis

getAll(): Promise<Device>
Returns
Promise<Device>:

Gets a list of all recent devices associated with the user the device list gets populated from Redis

refresh(): Promise<Device>
Returns
Promise<Device>:

Search for a device by name

search(options: Object): Promise<Device>
Parameters
options (Object)
Name Description
options.searchQuery string
Returns
Promise<Device>:

Caches the device info and also registers to Redis for subsequent fetches

upsert(device: Object): deviceInfo
Parameters
device (Object)
Name Description
device.id string
Returns
deviceInfo:

Retreives device info of a particular device

get(token: string): Promise<deviceInfo>
Parameters
token (string)
Returns
Promise<deviceInfo>:

Unregisters the device from Redis, will not fetch in subsequent loads, similar to space.deleteBinding()

remove(deviceId: string): Promise<deviceInfo>
Parameters
deviceId (string)
Returns
Promise<deviceInfo>:

Requests to display PIN on the device

requestPin(device: object, options: object): Promise<deviceInfo>
Parameters
device (object)
options (object = {})
Name Description
options.data object
Returns
Promise<deviceInfo>:

pairs the device with the user (manual pairing), also adds it to user's recents list for subsequent fetches. similar to space.join()

pair(options: object): Promise<deviceInfo>
Parameters
options (object = {})
Name Description
options.pin number
Returns
Promise<deviceInfo>:

unpairs the device with the user (manual/ultrasonic pairing), but still keeps in the recents list/does not remove from Redis options.removeAllDevices will remove all associated devices to user similar to space.leave()

unpair(options: object): Promise<deviceInfo>
Parameters
options (object = {})
Name Description
options.removeAllDevices boolean
Returns
Promise<deviceInfo>:

binds the space to the paired device (if supported) similar to space.bindConversation()

bindSpace(options: object): Promise<deviceInfo>
Parameters
options (object = {})
Name Description
options.url boolean , conversation url
options.kmsResourceObjectUrl boolean of the convo
Returns
Promise<deviceInfo>:

unbinds the space to the paired device (if supported) similar to space.unbindConversation()

unbindSpace(): Promise<deviceInfo>
Returns
Promise<deviceInfo>:

Gets the audio state of the paired device similar to device.getAudioState()

getAudioState(): Promise<audioState>
Returns
Promise<audioState>:

Updates audio state of the paired device, should be called every 10 minutes or when mic or volume state is changed similar to device.putAudioState()

putAudioState(space: object, audioState: object): Promise<audioState>
Parameters
space (object)
audioState (object = {})
Returns
Promise<audioState>:

Mutes paired device similar to device.mute()

mute(): Promise<audioState>
Returns
Promise<audioState>:

Unmutes paired device similar to device.unmute()

unmute(): Promise<audioState>
Returns
Promise<audioState>:

Increases paired device's volume similar to device.increaseVolume()

increaseVolume(): Promise<audioState>
Returns
Promise<audioState>:

Decreases paired device's volume similar to device.decreaseVolume()

decreaseVolume(): Promise<audioState>
Returns
Promise<audioState>:

Sets paired device's volume but should use increase and decrease api instead similar to device.setVolume()

setVolume(level: number): Promise<audioState>
Parameters
level (number = 0)
Returns
Promise<audioState>:

Utility function to update decrypted device name on device object

_updateDeviceMetadata(deviceArray: Array): device
Parameters
deviceArray (Array = [])
Returns
device:

Utility function to update decrypted device name on device object

_decryptDeviceName(inDevice: object): device
Parameters
inDevice (object = {})
Returns
device:

Utility function to update device info on mercury updates

_receiveDeviceUpdates(device: object): device
Parameters
device (object)
Returns
device:
new LogsRequest()
Static Members
uploadLogs(options)

MediaDirection

MediaDirection

Type: Object

Properties
sendAudio (boolean)
receiveAudio (boolean)
sendVideo (boolean)
receiveVideo (boolean)
sendShare (boolean)
receiveShare (boolean)

MediaDirection

MediaDirection

Type: Object

Properties
sendAudio (boolean)
receiveAudio (boolean)
sendVideo (boolean)
receiveVideo (boolean)
sendShare (boolean)
receiveShare (boolean)
isSharing (boolean)

SendOptions

SendOptions

Type: Object

Properties
sharePreferences (Object)
Media

Type: any

Static Members
getLocalMedia(options, config)
createMediaConnection(isMultistream, debugId, webex, meetingId, correlationId, options)
getDisplayMedia(options, config)
getMedia(audio, video, config)
toggleStream()
stopStream(stream)
getUserMedia(mediaSetting, audioVideo, sharePreferences, config)

Rtc Metrics

new RtcMetrics(webex: object, meetingId: string, correlationId: string)
Parameters
webex (object) The main webex object.
meetingId (string) The meeting id.
correlationId (string) The correlation id.
Instance Members
metricsQueue
sendMetricsInQueue()
addMetrics(data)
closeMetrics()
anonymizeIp(stats)

Returns the current state of knowledge about whether we are on an ipv4-only or ipv6-only or mixed (ipv4 and ipv6) network. The return value matches the possible values of "ipver" parameter used by the backend APIs.

getIpVersion(webex: Object): (IP_VERSION | undefined)
Parameters
webex (Object) webex instance
Returns
(IP_VERSION | undefined): ipver value to be passed to the backend APIs or undefined if we should not pass any value to the backend

Returns options for leaving a meeting.

prepareLeaveMeetingOptions(meeting: any, options: any): any
Parameters
meeting (any)
options (any = {})
Returns
any: leave options

Returns request options for leaving a meeting.

buildLeaveFetchRequestOptions(meeting: any, options: any): any
Parameters
meeting (any)
options (any = {})
Returns
any: request options

Adds the current locus sequence information to a request body

addSequence(meeting: Object, requestBody: Object): void
Parameters
meeting (Object) The meeting object
requestBody (Object) The body of a request to locus
Returns
void:

Updates the locus info for the meeting with the delta locus returned from requests that include the sequence information Returns the original response object

updateLocusWithDelta(meeting: Object, response: Object): Object
Parameters
meeting (Object) The meeting object
response (Object) The response of the http request
Returns
Object:

Returns a CA-recognized error payload for the specified raw error message/reason.

New errors can be added to this function for handling in the future

getChangeMeetingFloorErrorPayload(reason: String): Array<object>
Parameters
reason (String) the raw error message
Returns
Array<object>: an array of payload objects
new MeetingInfo()
Static Members
getMeetingInfo(id)
setMeetingInfo(id, info)
fetchInfoOptions(destination, type = null)
fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null, installedOrgID = null, locusId = null, extraParams = {}, options = {})
fetchMeetingInfo(destination, type = null, password, captchaInfo, installedOrgID, locusId, extraParams, options)
createAdhocSpaceMeeting(conversationUrl, installedOrgID)
new MeetingInfo()
Static Members
getMeetingInfo(id)
setMeetingInfo(id, info)
fetchInfoOptions(destination, type = null)
fetchMeetingInfo(destination, type = null, password = null, captchaInfo = null, installedOrgID = null, locusId = null, extraParams = {}, options = {})
fetchMeetingInfo(destination, type = null, password, captchaInfo, installedOrgID, locusId, extraParams, options)
createAdhocSpaceMeeting(conversationUrl, installedOrgID)
new MeetingInfoCollection()
Static Members
get(id)
new MeetingInfoRequest()
Static Members
fetchMeetingInfo(options)
new MeetingInfoRequest()
Static Members
fetchMeetingInfo(options)
new MeetingInfoUtil()
Static Members
getResourceUrl(type, value)
getRequestBody(options)
getWebexSite(uri)
getDirectMeetingInfoURI(options)
new MeetingInfoUtil()
Static Members
getResourceUrl(type, value)
getRequestBody(options)
getWebexSite(uri)
getDirectMeetingInfoURI(options)
new PersonalMeetingRoom()
Static Members
claim(link, pin, preferred = true)
get(options)
Instance Members
claimPmr(options: Object): Promise
Parameters
options (Object) with format of {userId, passcode, meetingAddress, preferred}
Returns
Promise: returns a promise that resolves/rejects the result of the request

This is the type that matches what backend expects us to send to them. It is a bit weird, because it uses strings instead of booleans and numbers, but that's what they require.

TransportResultForBackend

Type: {reachable: ("true" | "false")?, latencyInMilliseconds: string?, clientMediaIPs: Array<string>?, untested: "true"?}

Properties
reachable (("true" | "false")?)
latencyInMilliseconds (string?)
clientMediaIPs (Array<string>?)
untested ("true"?)
new Reachability()
Static Members
gatherReachability()
isAnyPublicClusterReachable()
Instance Members
getReachabilityMetrics()
getReachabilityResults()
isWebexMediaBackendUnreachable()
getStatistics(results, protocol, isVideoMesh)
sendMetric()
new ReachabilityRequest()
Instance Members
getClusters
remoteSDPForClusters

A class that handles reachability checks for a single cluster. It emits events from Events enum

new ClusterReachability(name: string, clusterInfo: ClusterNode)

Extends EventsScope

Parameters
name (string) cluster name
clusterInfo (ClusterNode) information about the media cluster
Instance Members
getResult()
abort()
start()

Converts a stun url to a turn url

convertStunUrlToTurn(stunUrl: string, protocol: ("tcp" | "udp")): string
Parameters
stunUrl (string) url of a stun server
protocol (("tcp" | "udp")) what protocol to use for the turn server
Returns
string: url of a turn server

Converts a stun url to a turns url

convertStunUrlToTurnTls(stunUrl: string): string
Parameters
stunUrl (string) url of a stun server
Returns
string: url of a turns server
new MeetingRequest()
Instance Members
getActiveMeetings()
fetchGeoHint()
getMeetingPreferences()
determineRedirections(responseBody)
joinMeeting(options)
getLocusDTO(options)
prepareLeaveMeetingRequestOptions(options)
leaveMeeting(options)
buildLeaveMeetingRequestOptions(options)
acknowledgeMeeting(options)
lockMeeting(options)
declineMeeting(options)
changeMeetingFloor(options)
sendDTMF(options)
changeVideoLayout(options)
endMeetingForAll(options)
keepAlive(options)
sendReaction(options)
toggleReactions($0)
new MeetingRequest()
Instance Members
getActiveMeetings()
fetchGeoHint()
getMeetingPreferences()
determineRedirections(responseBody)
joinMeeting(options)
getLocusDTO(options)
prepareLeaveMeetingRequestOptions(options)
leaveMeeting(options)
buildLeaveMeetingRequestOptions(options)
acknowledgeMeeting(options)
lockMeeting(options)
declineMeeting(options)
changeMeetingFloor(options)
sendDTMF(options)
changeVideoLayout(options)
endMeetingForAll(options)
keepAlive(options)
sendReaction(options)
toggleReactions($0)
new MeetingCollection()
Static Members
getByKey(key, value)
getActiveBreakoutLocus(breakoutUrl)
getActiveWebrtcMeeting()
new Collection()
Static Members
get(id)
set(id, value)
delete(id)
getAll()
setAll(set)

Meetings Media Codec Missing Event Emitted when H.264 codec is not found in the browser.

media:codec:missing

Meetings Media Codec Loaded Event Emitted when H.264 codec has been loaded in the browser.

media:codec:loaded

get device from locus data

getThisDevice(newLocus: Object, deviceUrl: String): Object
Parameters
newLocus (Object) new locus data
deviceUrl (String) current device url
Returns
Object:

get self device joined status from locus data

joinedOnThisDevice(meeting: Object, newLocus: Object, deviceUrl: String): Object
Parameters
meeting (Object) current meeting data
newLocus (Object) new locus data
deviceUrl (String) current device url
Returns
Object:

Extended Error object for general parameter errors

new NoMeetingInfoError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.NO_MEETING_INFO.MESSAGE)
error (Object? = null)
new LocusRetryStatusInterceptor()

Extends Interceptor

Static Members
Instance Members
onResponseError(options, reason)
handleRetryRequestLocusServiceError(options, retryAfterTime)

Extended Error object to signify captcha related errors

new CaptchaError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.CAPTCHA.MESSAGE)
error (Object? = null)

Extended Error object to signify the intent to join for unclaimed PMR scenarios

new IntentToJoinError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.INTENT_TO_JOIN.MESSAGE)
error (Object? = null)

Extended Error object to signify password related errors

new PasswordError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.PASSWORD.MESSAGE)
error (Object? = null)

Extended Error object for general parameter errors

new PermissionError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.PERMISSION.MESSAGE)
error (Object? = null)

Extended Error object for reclaim host role empty or wrong key

new ReclaimHostEmptyWrongKeyError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = MEETINGCONSTANTS.ERROR_DICTIONARY.RECLAIM_HOST_ROLE_EMPTY_OR_WRONG_KEY.MESSAGE)
error (Object? = null)

Extended Error object for reclaim host role not supported

new ReclaimHostNotSupportedError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = MEETINGCONSTANTS.ERROR_DICTIONARY.RECLAIM_HOST_ROLE_NOT_SUPPORTED.MESSAGE)
error (Object? = null)

Extended Error object for reclaim host role not allowed for other participants

new ReclaimHostNotAllowedError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = MEETINGCONSTANTS.ERROR_DICTIONARY.RECLAIM_HOST_ROLE_NOT_ALLOWED.MESSAGE)
error (Object? = null)

Extended Error object for reclaim host role when user is host already

new ReclaimHostIsHostAlreadyError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = MEETINGCONSTANTS.ERROR_DICTIONARY.RECLAIM_HOST_ROLE_IS_ALREADY_HOST.MESSAGE)
error (Object? = null)

SharePreferences

SharePreferences

Type: Object

Properties
shareConstraints (Object?)
highFrameRate (Boolean?)

JoinOptions

JoinOptions

Type: Object

Properties
resourceId (String?)
pin (String?)
moderator (Boolean?)
meetingQuality ((String | Object)?)
  • meetingQuality.remote String?
rejoin (Boolean?)
enableMultistream (Boolean?)

Recording

Recording

Type: Object

Properties
state (Object)
modifiedBy (String)

The meeting instance to execute all state changes on

meeting

Specify joining via audio (option: pstn), video, screenshare

join(options: JoinOptions): Promise
Parameters
options (JoinOptions = {}) A configurable options object for joining a meeting
Returns
Promise: the join response

Values for some browsers specifically Safari will be undefined we explicitly set to null https://bugs.webkit.org/show_bug.cgi?id=206645 https://bugs.webkit.org/show_bug.cgi?id=212668

PACKETLOSS

NetworkQualityMonitor class that will emit events based on detected quality

new NetworkQualityMonitor()

Extends EventsScope

Static Members
emitNetworkQuality()
updateNetworkQualityStatus()
determineUplinkNetworkQuality(configObj)
Instance Members
networkQualityStats
Events
network:quality

determines if packetLoss ratio is over threshold set in config sets networkQualityScore to 0 if over threshold

determinePacketLoss
Returns
boolean:

determines if round trip time value is over threshold set in config sets networkQualityScore to 0 if over threshold

determineLatency
Returns
boolean:

determines if jitter value is over threshold in config sets networkQualityScore to 0 if over threshold

deterMineJitter
Returns
boolean:

returns null if val is specifically undefined

determineIfUndefined
Parameters
value ((number | undefined))
Returns
(number | null):

Roap options

RoapOptions

Type: Object

Properties
sdp (String)
meeting (Meeting)
seq (Number)
tieBreaker (Number)
reconnect (Boolean)
SeqOptions

Type: Object

Properties
correlationId (String)
mediaId (String)
seq (Number)
new RoapRequest()
Instance Members
attachReachabilityData(localSdp)
sendRoap(options)

Handles the process of finding out TURN server information from Linus. This is achieved by sending a TURN_DISCOVERY_REQUEST.

new TurnDiscovery(roapRequest: RoapRequest)
Parameters
roapRequest (RoapRequest)
Instance Members
generateTurnDiscoveryRequestMessage(meeting, isForced)
abort()
sendRoapOK(meeting)
isSkipped(meeting)
doTurnDiscovery(meeting, isReconnecting?, isForced?)
new MediaProperties()
Instance Members
getVideoDeviceId()
setRemoteAudioStream(remoteAudioStream)
setRemoteVideoStream(remoteVideoStream)
setVideoDeviceId(deviceId)
unsetRemoteMedia()
unsetRemoteStreams()
hasLocalShareStream()
waitForMediaConnectionConnected()
getCurrentConnectionInfo()
new MediaConnectionAwaiter()
Instance Members
connectionStateChange()
peerConnectionStateHandler()
iceConnectionStateHandler()
iceGatheringStateHandler()
onTimeout()
waitForMediaConnectionConnected()

Initializes the StateMachine for the meeting

create(meetingRef: Meeting): StateMachine
Parameters
meetingRef (Meeting) A reference to a meeting instance
Returns
StateMachine:
to(remote: Object): String
Parameters
remote (Object)
Name Description
remote.remoteAnswered Boolean
remote.remoteDeclined Boolean
Returns
String:

Ring stop transition, to end the ring event for the meeting, and transition the state to ANSWERED OR DECLINED, only for outgoing meetings

onRemote(transition: Object, stop: Object): Boolean
Parameters
transition (Object) -- FiniteStateMachine automatically passed, not used
stop (Object) -- {remoteAnswered: {Boolean}, remoteDeclined: {Boolean}}
Returns
Boolean:

Ring transition, to cause the ring event for the meeting, and transition the state to RINGING, for both incoming, and outgoing meetings

onRing(transition: Object, type: String): Boolean
Parameters
transition (Object) -- FiniteStateMachine automatically passed, not used
type (String) -- incoming call === INCOMING / or other meetings have a ring type of JOIN
Returns
Boolean:

handle the entry to error state

onEnterError(transition: Object, error: Error): Boolean
Parameters
transition (Object)
error (Error)
Returns
Boolean:

After ANY transition occurs, we want to know what state the meeting moved to for debugging

onAfterTransition(transition: Object): Boolean
Parameters
transition (Object)
Returns
Boolean:

The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches the last requested state by the client.

More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#

This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called

new MuteState(type: String, meeting: Object, enabled: boolean)
Parameters
type (String) audio or video
meeting (Object) the meeting object (used for reading current remote mute status)
enabled (boolean) whether the client audio/video is enabled at all
Static Members
handleLocalStreamMuteStateChange(meeting?, mute?)
applyClientStateLocally(meeting?, reason)
handleServerRemoteMuteUpdate(meeting, muted?, unmuteAllowed?)
handleServerLocalUnmuteRequired(meeting?)
isMuted()
isRemotelyMuted()
isUnmuteAllowed()
isLocallyMuted()
Instance Members
init(meeting)
handleLocalStreamChange(meeting)
enable(meeting, enable)

Stores the delta values for a changed participant.

DeltaParticipant

Type: Object

Properties
delta (Record<string, boolean>) : Contains changed streams.
person (Object) : Contains person data.

handles when the locus.host is updated

updateHostInfo(host: Object): undefined
Parameters
host (Object) the locus.host property
Returns
undefined:

handles when the locus.mediaShares is updated

updateMediaShares(mediaShares: Object): undefined
Parameters
mediaShares (Object) the locus.mediaShares property
Returns
undefined:

handles when the locus.self is updated

updateSelf(self: Object, participants: Array): undefined
Parameters
self (Object) the locus.mediaShares property
participants (Array) the locus.participants property
Returns
undefined:

parses the relevant values for self: muted, guest, moderator, mediaStatus, state, joinedWith, pstnDevices, creator, id

parse(self: Object, deviceId: String): undefined
Parameters
self (Object)
deviceId (String)
Returns
undefined:

Checks if user has joined the meeting

isJoined(self: Object): boolean
Parameters
self (Object)
Returns
boolean: isJoined

Validate if the Meeting Layout Controls Layout has changed.

layoutChanged(previous: Self, current: Self): boolean
Parameters
previous (Self) Previous self state
current (Self) Current self state [per event]
Returns
boolean: If the Meeting Layout Controls Layout has changed.

get the id from the self object

getSelfIdentity(self: Object): String
Parameters
self (Object)
Returns
String:

get the "remote video mute" property from the self object

getRemoteVideoMuted(self: Object): Boolean
Parameters
self (Object)
Returns
Boolean:

get the "remote mute" property from the self object

getRemoteMuted(self: Object): Boolean
Parameters
self (Object)
Returns
Boolean:
wasMediaInactiveOrReleased(oldSelf: Object, changedSelf: Object): Boolean
Parameters
oldSelf (Object = {})
changedSelf (Object)
Returns
Boolean:
isLocusUserUnadmitted(check: Object): Boolean
Parameters
check (Object)
Returns
Boolean:
isLocusUserAdmitted(check: Object): Boolean
Parameters
check (Object)
Returns
Boolean:
isUserUnadmitted(self: Object): Boolean
Parameters
self (Object)
Returns
Boolean:
Throws
  • Error: when self is undefined

determine whether the roles of self is changed or not

isRolesChanged(oldSelf: Object, changedSelf: Object): Boolean
Parameters
oldSelf (Object)
changedSelf (Object)
Returns
Boolean:
isDeviceObserving(oldSelf: Object, changedSelf: Object): Boolean
Parameters
oldSelf (Object)
changedSelf (Object)
Returns
Boolean:
Throws
  • Error: if changed self was undefined
isUserAdmitted(oldSelf: Object, changedSelf: Object): Boolean
Parameters
oldSelf (Object)
changedSelf (Object)
Returns
Boolean:
Throws
  • Error: if changed self was undefined

extract the sipUrl from the partner

getSipUrl(partner: Object, type: any, sipUri: any, info: Object): Object
Parameters
partner (Object)
type (any)
sipUri (any)
info (Object)
Returns
Object:

parse the relevant host values that we care about: id

parse(host: Object): Object
Parameters
host (Object)
Returns
Object: parsed host or null if host was undefined

get the previous and current host values parsed, as well as the boolean updates

getHosts(oldHost: Object, newHost: Object): Object
Parameters
oldHost (Object)
newHost (Object)
Returns
Object: previous: {Object} old host, current: {Object} new host, updates: {isNewHost: {boolean}} boolean update values

determine by id if 2 hosts are different

isDifferentHosts(previousId: String, currentId: String): Boolean
Parameters
previousId (String)
currentId (String)
Returns
Boolean:

Extract the id from the host object

getId(host: Object): String
Parameters
host (Object)
Returns
String:

Controls

LocusControls

Type: Object

Properties
record (Object)

parse the relevant host values that we care about: id

parse(controls: LocusControls): Object
Parameters
controls (LocusControls)
Returns
Object: parsedObject - parsed host or null if host was undefined
Returns
String: parsedObject.recordingId

parses and returns previous state vs current state and triggers the changes.

getControls(oldControls: LocusControls, newControls: LocusControls): Object
Parameters
oldControls (LocusControls) previous state
newControls (LocusControls) current state
Returns
Object: combination of state plus the changes

Extract the id from the record controls object

getId(controls: LocusControls): (String | null)
Parameters
controls (LocusControls)
Returns
(String | null):

check whether to replace the meeting's members or not. For case joined breakout session, need replace meeting's members

isNeedReplaceMembers(oldControls: LocusControls, controls: LocusControls): Boolean
Parameters
oldControls (LocusControls)
controls (LocusControls)
Returns
Boolean:

determine the switch status between breakout session and main session.

getSessionSwitchStatus(oldControls: LocusControls, controls: LocusControls): Object
Parameters
oldControls (LocusControls)
controls (LocusControls)
Returns
Object:

Parse the relevant values that we care about

parseApp(embeddedApp: Object): Object
Parameters
embeddedApp (Object) raw embedded app object
Returns
Object: parsedObject - parsed embedded app object

Determines if two embedded apps arrays are similar. NOTE: This is a simple test for performance reasons.

areSimilar(apps1: Array<any>, apps2: Array<any>): boolean
Parameters
apps1 (Array<any>) an array of apps
apps2 (Array<any>) an array of apps
Returns
boolean: true if the arrays are different

Parse the array of embedded apps

parse(embeddedApps: array): array
Parameters
embeddedApps (array)
Returns
array: result - new array of parsed embedded app objects

parses the relevant values for mediaShares: contentId, disposition

parse(mediaShares: Object): undefined
Parameters
mediaShares (Object)
Returns
undefined:

get the previous and current mediaShares values parsed, as well as the boolean updates

getMediaShares(oldShare: Object, newShare: Object): Object
Parameters
oldShare (Object)
newShare (Object)
Returns
Object: previous: {Object} old share, current: {Object} new share,

get the content floor disposition (released, granted)

getContentDisposition(mediaShares: Object): Boolean
Parameters
mediaShares (Object)
Returns
Boolean: disposition

get the whiteboard floor disposition (released, granted)

getWhiteboardDisposition(mediaShares: Object): Boolean
Parameters
mediaShares (Object)
Returns
Boolean: disposition

extract the content property from media shares

extractContent(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

extract the whiteboard property from media shares

extractWhiteboard(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

extract the media stream floor property from content object

extractFloor(mediaStream: Object): Object
Parameters
mediaStream (Object)
Returns
Object:

extract the content's floor from media shares

extractContentFloor(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

extract the whiteboard's floor from media shares

extractWhiteboardFloor(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get who is sharing from media shares (content)

getContentBeneficiaryId(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get live annotation is sharing from media shares (content)

getContentAnnotation(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get live resourceType is sharing from media shares (content)

getContentResourceType(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get url is sharing from media shares (content)

getContentUrl(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get shareInstanceId is sharing from media shares (content)

getShareInstanceId(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get deviceUrl that is requesting the floor for media shares (content)

getContentBeneficiaryDeviceUrl(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get who is sharing from media shares (whiteboard)

getWhiteboardBeneficiaryId(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

get the which whiteboard is being shared via resource url

getWhiteboardResourceUrl(mediaShares: Object): Object
Parameters
mediaShares (Object)
Returns
Object:

Compares two loci to determine which one contains the most recent state

compare(current: Types~Locus, incoming: Types~Locus): string
Parameters
current (Types~Locus)
incoming (Types~Locus)
Returns
string: loci comparison state
LociMetadata

Type: object

Properties
start (number) : Starting sequence number
end (number) : Ending sequence number
first (number) : First sequence number
last (number) : Last sequence number
min (number) : Minimum sequence number
max (number) : Maximum sequence number
entries (number) : Loci sequence entries

Simple queue in which the elements are always sorted

new SortedQueue(compareFunc: Function)
Parameters
compareFunc (Function) comparison function used for sorting the elements of the queue
Instance Members
clear()
enqueue(item)
dequeue()
size()

Used to indicate that the reconnect logic needs to be retried.

new NeedsRetryError()

Extends Error

Used to indicate that the meeting needs to be rejoined, not just media reconnected

new NeedsRejoinError()

Extends Error

new ReconnectionManager()
Static Members
resetReconnectionTimer()
iceReconnected()
waitForIceReconnect()
isReconnectInProgress()
reconnect(reconnectOptions, completionCallback = undefined)
Instance Members
rejoinMeeting(wasSharing)

Error object for cases when new reconnection cannot be started

new ReconnectionNotStartedError(message: String?, error: Object?)

Extends ReconnectionError

Parameters
message (String? = ERROR_DICTIONARY.RECONNECTION_NOT_STARTED.MESSAGE)
error (Object? = null)

Extended Error object to signify the intent to join for unclaimed PMR scenarios

new ReconnectionError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.RECONNECTION.MESSAGE)
error (Object? = null)
new Members()
Static Members
setLocusUrl(locus, locusUrl = null)
setHostId(locus, hostId = null)
setType(fullState, type = null)
setSelfId(locus, selfId = null)
setMediaShareContentId(locus, contentId?)
setMediaShareWhiteboardId(locus, whiteboardId?)
addMember(invitee, alertIfActive?)
cancelPhoneInvite(invitee)
admitMembers(memberIds, sessionLocusUrls)
removeMember(memberId)
muteMember(memberId, mute = true, isAudio = true)
assignRoles(memberId, roles)
raiseOrLowerHand(memberId, raise = true)
lowerAllHands(requestingMemberId)
transferHostToMember(memberId, moderator = true)
sendDialPadKey(tones, memberId)
editDisplayName(memberId, requestingParticipantId, alias?)
Instance Members
findMemberByCsi(csi)
getCsisForMember(memberId, mediaType, mediaContent)
Events
members:update
members:content:update
members:host:update
members:self:update
new Member()
Static Members
setIsContentSharing(flag)
setIsHost(flag)
setIsSelf(flag)
processIsContentSharing(participant, sharingId)
processIsRecording(participant, recordingId)
Instance Members
supportsBreakouts
supportLiveAnnotation
isContentSharing
associatedUser
isModeratorAssignmentProhibited
mediaStatus
canReclaimHost(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
getControlsRoles(participant: Object): [ServerRoleShape]
Parameters
participant (Object) the locus participant
Returns
[ServerRoleShape]:
hasRole(participant: Object, controlRole: ServerRoles): Boolean
Parameters
participant (Object) the locus participant
controlRole (ServerRoles) the search role
Returns
Boolean:
hasCohost(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
hasModerator(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
hasPresenter(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
extractControlRoles(participant: Object): IExternalRoles
Parameters
participant (Object) the locus participant
Returns
IExternalRoles:
isUser(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isGuest(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isDevice(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:

checks to see if the participant id is the same as the passed id there are multiple ids that can be used

isSame(participant: Object, id: String): Boolean
Parameters
participant (Object) the locus participant
id (String)
Returns
Boolean:

checks to see if the participant id is the same as the passed id for associated devices there are multiple ids that can be used

isAssociatedSame(participant: Object, id: String): Boolean
Parameters
participant (Object) the locus participant
id (String)
Returns
Boolean:
isNotAdmitted(participant: Object, isGuest: Boolean, status: String): Boolean
Parameters
participant (Object) the locus participant
isGuest (Boolean)
status (String)
Returns
Boolean:
isAudioMuted(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isVideoMuted(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isHandRaised(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isBreakoutsSupported(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isInterpretationSupported(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
isLiveAnnotationSupported(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:

utility method for audio/video muted status

isMuted(participant: any, statusAccessor: String, controlsAccessor: String): (Boolean | undefined)
Parameters
participant (any)
statusAccessor (String)
controlsAccessor (String)
Returns
(Boolean | undefined):

utility method for getting the recording member for later comparison

getRecordingMember(controls: Object): (String | null)
Parameters
controls (Object)
Returns
(String | null):
isRecording(participant: Object): Boolean
Parameters
participant (Object) the locus participant
Returns
Boolean:
extractStatus(participant: Object): String
Parameters
participant (Object) the locus participant
Returns
String:
extractId(participant: Object): String
Parameters
participant (Object) the locus participant
Returns
String:

extracts the media status from nested participant object

extractMediaStatus(participant: Object): Object
Parameters
participant (Object) the locus participant
Returns
Object:
extractName(participant: Object): String
Parameters
participant (Object) the locus participant
Returns
String:
new MembersCollection()
Static Members
getAll()
Instance Members
new MembersRequest()
Static Members
addMembers(options)
admitMember(options)
editDisplayNameMember(options)
cancelPhoneInvite(options)
Instance Members
removeMember(options)
muteMember(options)
assignRolesMember(options)
raiseOrLowerHandMember(options)
lowerAllHandsMember(options)
transferHostToMember(options)
sendDialPadKey(options)
generateAddMemberOptions(invitee: Object, locusUrl: String, alertIfActive: Boolean): Object
Parameters
invitee (Object) with emailAddress, email or phoneNumber
locusUrl (String)
alertIfActive (Boolean)
Returns
Object: the format object
generateAdmitMemberOptions(memberIds: Array, locusUrl: String): Object
Parameters
memberIds (Array)
locusUrl (String)
Returns
Object: the format object
getAddMemberBody(options: Object): Object
Parameters
options (Object) with {invitee: {emailAddress, email, phoneNumber}, alertIfActive}
Returns
Object: with {invitees: [{address}], alertIfActive}
getAdmitMemberRequestBody(options: Object): Object
Parameters
options (Object) with {memberIds, authorizingLocusUrl}
Returns
Object: admit with {memberIds}
getAdmitMemberRequestParams(format: Object): Object
Parameters
format (Object) with {memberIds, locusUrl, sessionLocusUrls}
Returns
Object: the request parameters (method, uri, body) needed to make a admitMember request if a host/cohost is in a breakout session, the locus url should be the main session locus url
getAddMemberRequestParams(format: Object): Object
Parameters
format (Object) with {invitee {emailAddress, email, phoneNumber}, locusUrl, alertIfActive}
Returns
Object: the request parameters (method, uri, body) needed to make a addMember request

generateRoleAssignmentMemberOptions

packages/@webex/plugin-meetings/src/members/util.ts
generateRoleAssignmentMemberOptions(memberId: String, roles: [ServerRoleShape], locusUrl: String): RoleAssignmentOptions
Parameters
memberId (String)
roles ([ServerRoleShape])
locusUrl (String)
Returns
RoleAssignmentOptions:

generateEditDisplayNameMemberOptions

packages/@webex/plugin-meetings/src/members/util.ts
generateEditDisplayNameMemberOptions(memberId: String, requestingParticipantId: String, alias: String, locusUrl: String): Object
Parameters
memberId (String) id of the participant who is receiving request
requestingParticipantId (String) id of the participant who is sending request (optional)
alias (String) alias name
locusUrl (String) url
Returns
Object: consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
getAddedRoleShape(role: ServerRoleShape): ServerRoleShape
Parameters
role (ServerRoleShape)
Returns
ServerRoleShape: the role shape to be added to the body

getRoleAssignmentMemberRequestParams

packages/@webex/plugin-meetings/src/members/util.ts
getRoleAssignmentMemberRequestParams(options: RoleAssignmentOptions): RoleAssignmentRequest
Parameters
options (RoleAssignmentOptions)
Returns
RoleAssignmentRequest: the request parameters (method, uri, body) needed to make a addMember request
editDisplayNameMemberRequestParams(options: Object): Object
Parameters
options (Object) with format of {locusUrl: string, requestingParticipantId: string}
Returns
Object: request parameters (method, uri, body) needed to make a editDisplayName request

The Controls Options Manager utilities

new Utils()
Static Members
canSetMuteOnEntry(displayHints)
canSetDisallowUnmute(displayHints)
canUnsetMuteOnEntry(displayHints)
canUnsetDisallowUnmute(displayHints)
canSetMuted(displayHints)
canUnsetMuted(displayHints)
hasHints(config)
hasPolicies(config)
canUpdateAudio(control, displayHints)
canUpdateReactions(control, displayHints)
canUpdateShareControl(displayHints)
canUpdateViewTheParticipantsList(control, displayHints)
canUpdateVideo(control, displayHints)
canUpdate(control, displayHints)

A list of additional properties that apply to various specific settings.

key

The scope of the control within this object.

scope

Type: Control

The properties to assign to this control.

properties

Type: Props

Manages all receive slots used by a meeting. WMCE receive slots cannot be ever deleted, so this manager has a pool in order to re-use the slots that were released earlier.

new ReceiveSlotManager(createSlotCallback: CreateSlotCallback, findMemberIdByCsiCallback: FindMemberIdCallback, meeting: Meeting)
Parameters
createSlotCallback (CreateSlotCallback)
findMemberIdByCsiCallback (FindMemberIdCallback)
meeting (Meeting)
Instance Members
allocateSlot(mediaType)
releaseSlot(slot)
reset()
getStats()
updateMemberIds()
findReceiveSlotBySsrc(ssrc)

This method is used to create a sendSlot for the given mediaType and returns the created sendSlot

createSlot(mediaConnection: MultistreamRoapMediaConnection, mediaType: MediaType, active: boolean): SendSlot
Parameters
mediaConnection (MultistreamRoapMediaConnection) MultistreamRoapMediaConnection for which a sendSlot needs to be created
mediaType (MediaType) MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
active (boolean = true) This is optional boolean to set the active state of the sendSlot. Default is true
Returns
SendSlot: slot The created sendSlot

This method is used to retrieve the sendSlot for the given mediaType

getSlot(mediaType: MediaType): SendSlot
Parameters
mediaType (MediaType) of which the slot needs to be retrieved
Returns
SendSlot:

Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.

setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: []): void
Parameters
mediaType (MediaType) MediaType of the sendSlot to which the audio stream needs to be send to the media group
namedMediaGroups ([]) Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero, named media group will be canceled and the audio stream will be sent to the floor.
Returns
void:

This method publishes the given stream to the sendSlot for the given mediaType

publishStream(mediaType: MediaType, stream: LocalStream): Promise<void>
Parameters
mediaType (MediaType) MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
stream (LocalStream) LocalStream to be published
Returns
Promise<void>:

This method unpublishes the stream from the sendSlot of the given mediaType

unpublishStream(mediaType: MediaType): Promise<void>
Parameters
mediaType (MediaType) MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
Returns
Promise<void>:

This method is used to set the active state of the sendSlot for the given mediaType

setActive(mediaType: MediaType, active: boolean): void
Parameters
mediaType (MediaType) The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
active (boolean = true) The boolean to set the active state of the sendSlot. Default is true
Returns
void:

This method is used to set the codec parameters for the sendSlot of the given mediaType

setCodecParameters(mediaType: MediaType, codecParameters: Object): Promise<void>
Parameters
mediaType (MediaType) MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
codecParameters (Object)
Returns
Promise<void>:

This method is used to delete the codec parameters for the sendSlot of the given mediaType

deleteCodecParameters(mediaType: MediaType, parameters: Array<String>): Promise<void>
Parameters
mediaType (MediaType) MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
parameters (Array<String>) Array of keys of the codec parameters to be deleted
Returns
Promise<void>:

This method is used to reset the SendSlotsManager by deleting all the sendSlots

reset(): undefined
Returns
undefined:

Default configuration:

  • uses 3 audio streams
  • prefers active speakers with live video (e.g. are not audio only or video muted) over active speakers without live video
  • has a few layouts defined, including 1 that contains remote screen share (ScreenShareView)
DefaultConfiguration

Type: Configuration

A helper class that manages all remote audio/video streams in order to achieve a predefined set of layouts. It also creates a fixed number of audio streams and these don't change during the meeting.

Things that RemoteMediaManager does:

  • owns the receive slots (creates them when needed, and re-uses them when switching layouts)
  • constructs appropriate RemoteMedia and RemoteMediaGroup objects and sends appropriate mediaRequests
new RemoteMediaManager(receiveSlotManager: ReceiveSlotManager, mediaRequestManagers: {audio: MediaRequestManager, video: mediaRequestManagers}, config: Configuration)

Extends EventsScope

Parameters
receiveSlotManager (ReceiveSlotManager)
mediaRequestManagers ({audio: MediaRequestManager, video: mediaRequestManagers})
config (Configuration = DefaultConfiguration) Configuration describing what video layouts to use during the meeting
Instance Members
start()
stop()
setLayout(layoutId)
getLayoutId()
setPreferLiveVideo(preferLiveVideo)
setActiveSpeakerCsis(remoteMediaCsis)
setReceiveNamedMediaGroup(mediaType, languageId, languageCode)
logAllReceiveSlots()
setRemoteVideoCsi(remoteMedia, csi)
addMemberVideoPane(newPane)
removeMemberVideoPane(paneId)
pinActiveSpeakerVideoPane(remoteMedia, csi)
unpinActiveSpeakerVideoPane(remoteMedia)
isPinned(remoteMedia)

Gets the array of remote media elements from the group

getRemoteMedia(filter: string): Array<RemoteMedia>
Parameters
filter (string = 'all') 'all' (default) returns both pinned and unpinned
Returns
Array<RemoteMedia>:

Sets CSIs for multiple RemoteMedia instances belonging to this RemoteMediaGroup. For each entry in the remoteMediaCsis array:

  • if csi is specified, the RemoteMedia instance is pinned to that CSI
  • if csi is undefined, the RemoteMedia instance is unpinned
setActiveSpeakerCsis(remoteMediaCsis: Array<{remoteMedia: RemoteMedia, csi: number?}>, commit: any): void
Parameters
remoteMediaCsis (Array<{remoteMedia: RemoteMedia, csi: number?}>)
commit (any = true)
Returns
void

Pins a specific remote media instance to a specfic CSI, so the media will no longer come from active speaker, but from that CSI. If no CSI is given, the current CSI value is used.

pin(remoteMedia: RemoteMedia, csi: CSI?): void
Parameters
remoteMedia (RemoteMedia)
csi (CSI?)
Returns
void

Unpins a remote media instance, so that it will again provide media from active speakers

unpin(remoteMedia: RemoteMedia)
Parameters
remoteMedia (RemoteMedia)

setPreferLiveVideo - sets preferLiveVideo to true/false

setPreferLiveVideo(preferLiveVideo: boolean, commit: boolean)
Parameters
preferLiveVideo (boolean)
commit (boolean)

setNamedMediaGroup - sets named media group type and value

setNamedMediaGroup(namedMediaGroup: NamedMediaGroup, commit: boolean)
Parameters
namedMediaGroup (NamedMediaGroup)
commit (boolean)

Invalidates the remote media group by clearing the references to the receive slots used by all remote media from that group and cancelling all media requests. After this call the remote media group is unusable.

stop(commit: boolean)
Parameters
commit (boolean = true) whether to commit the cancellation of media requests

Checks if a given RemoteMedia instance belongs to this group.

includes(remoteMedia: RemoteMedia, filter: ("all" | "pinned" | "unpinned")): boolean
Parameters
remoteMedia (RemoteMedia) RemoteMedia instance to check
filter (("all" | "pinned" | "unpinned") = 'all') controls which remote media from the group to check
Returns
boolean: true if remote media is found

Returns true if the user is in the main session

fn(): boolean
Returns
boolean:

Returns true if the breakout status is active

fn(): boolean
Returns
boolean:

Returns the active group id

fn(): boolean
Returns
boolean:

Returns the breakout status

fn(): boolean
Returns
boolean:

Returns should query preAssignments or not

fn(): boolean
Returns
boolean:
new Breakouts()
Static Members
initialize()
cleanUp()
locusUrlUpdate(locusUrl)
updateCanManageBreakouts(canManageBreakouts)
breakoutServiceUrlUpdate(breakoutServiceUrl)
queryRosters()
handleRosterUpdate(locus)
listenToCurrentSessionTypeChange()
listenToBroadcastMessages()
listenToBreakoutRosters()
listenToBreakoutHelp()
isBreakoutInProgress()
isBreakoutIClosing()
updateBreakout(params)
updateBreakoutSessions(payload)
clearBreakouts()
getMainSession()
askAllToReturn()
broadcast(message, options)
enableBreakouts()
toggleBreakout(enable)
doToggleBreakout(enable)
_setManageGroups(breakoutInfo)
create(params)
clearSessions()
start(params)
end(params)
update(params, unlockEdit)
getBreakout(editlock)
enableAndLockBreakout()
hasBreakoutLocked()
lockBreakout()
keepEditLockAlive()
unLockEditBreakout()
assign(sessions)
queryPreAssignments()
dynamicAssign(sessions)
triggerReturnToMainEvent(breakout)

If the breakout has no name, assume it is the main session

fn(): boolean
Returns
boolean:
new Breakout()
Static Members
initialize()
join()
leave()
askForHelp()
initMembers()
isNeedHandleRoster(locus)
parseRoster(locus)
broadcast(message, options)
new BreakoutRequest()
Instance Members
broadcast($0, url, message, options, groupId, sessionId)

Deals with all kinds of errors of breakout service

boServiceErrorHandler
Parameters
error (object) // one of the breakout service error
position (string) // position of the error occur
Returns
object:

isSessionTypeChangedFromSessionToMain

packages/@webex/plugin-meetings/src/breakouts/utils.ts
isSessionTypeChangedFromSessionToMain
Parameters
breakout (object)
newSessionType (string)
Returns
boolean:

Extended Error object to signify breakout related errors

new BreakoutEditLockedError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = ERROR_DICTIONARY.BREAKOUT_EDIT.MESSAGE)
error (Object? = null)

Returns should query support languages or not

fn(): boolean
Returns
boolean:
new SimultaneousInterpretation()
Static Members
initialize()
cleanUp()
locusUrlUpdate(locusUrl)
approvalUrlUpdate(approvalUrl)
updateCanManageInterpreters(canManageInterpreters)
updateHostSIEnabled(hostSIEnabled)
updateMeetingSIEnabled(meetingSIEnabled, selfIsInterpreter)
updateInterpretation(interpretation)
updateSelfInterpretation($0, interpretation, selfParticipantId)
getTargetLanguageCode()
querySupportLanguages()
getInterpreters()
updateInterpreters(interpreters)
changeDirection()
listenToHandoffRequests()
handoffInterpreter(participantId)
requestHandoff()
acceptRequest(url)
declineRequest(url)

Annotation to handle LLM and Mercury message and locus API

new AnnotationChannel(args: ...any)

Extends WebexPlugin

Parameters
args (...any)
Instance Members
locusUrlUpdate(locusUrl)
approvalUrlUpdate(approvalUrl)
acceptRequest(approval)
declineRequest(approval)
approveAnnotation(requestData)
cancelApproveAnnotation(requestData, approval)
closeAnnotation(requestData)
sendStrokeData
new Webinar()
Static Members
locusUrlUpdate(locusUrl)
webcastUrlUpdate(webcastUrl)
webinarAttendeesSearchingUrlUpdate(webinarAttendeesSearchingUrl)
updateCanManageWebcast(canManageWebcast)
get(id: String): Member
Parameters
id (String)
Returns
Member:

IInMeetingActions Type for In-Meeting Actions

IInMeetingActions
new InMeetingActions()
Instance Members
set(options: Object): void
Parameters
options (Object)
Returns
void:
setLocusUrl(url: string): void
Parameters
url (string)
Returns
void:
setDisplayHints(hints: Array): void
Parameters
hints (Array)
Returns
void:
setUserPolicy(selfUserPolicies: Object): void
Parameters
selfUserPolicies (Object)
Returns
void:
setSessionId(id: string): void
Parameters
id (string)
Returns
void:
setServiceUrl(url: string): void
Parameters
url (string)
Returns
void:
getLocusUrl(): string
Returns
string:
getLocusId(): string
Returns
string:
getSessionId(): string
Returns
string:
getServiceUrl(): string
Returns
string:
getDisplayHints(): Array
Returns
Array:
startRecording(): Promise
Returns
Promise:
stopRecording(): Promise
Returns
Promise:
pauseRecording(): Promise
Returns
Promise:
resumeRecording(): Promise
Returns
Promise:

docs https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867 https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351

new ControlsOptionsManager(request: MeetingRequest, options: {locusUrl: string, displayHints: Array<string>?}?)
Parameters
request (MeetingRequest)
options ({locusUrl: string, displayHints: Array<string>?}?)
Static Members
set(options)
setLocusUrl(url)
setDisplayHints(hints)
setMuteOnEntry(enabled)
setDisallowUnmute(enabled)
setMuteAll(mutedEnabled, disallowUnmuteEnabled, muteOnEntryEnabled)
Instance Members
update(controls)

Class representing a single /media request being sent to Locus

new InternalRequestInfo(request: Request, pendingPromise: Defer, sendRequestFn: function (request: Request): Promise<RequestResult>)
Parameters
request (Request)
pendingPromise (Defer)
sendRequestFn (function (request: Request): Promise<RequestResult>)
Instance Members
getPendingPromises()
addPendingPromises(pendingPromises)
execute()

Returns true if the request is triggering confluence creation in the server

isRequestAffectingConfluenceState(request: Request): boolean
Parameters
request (Request)
Returns
boolean

This class manages all /media API requests to Locus. Every call to that Locus API has to go through this class.

new LocusMediaRequest(config: Config, options: any)

Extends WebexPlugin

Parameters
config (Config)
options (any)
Instance Members
send(request)
isConfluenceCreated()

Current overall connection state

state

Type: ConnectionState

new ConnectionStateHandler()

Extended Error object for general parameter errors

new ParameterError(message: String?, error: Object?)

Extends Error

Parameters
message (String? = MEETINGCONSTANTS.ERROR_DICTIONARY.PARAMETER.MESSAGE)
error (Object? = null)
new MeetingNotActiveError()

Extends WebexMeetingsError

Properties
code (number) : 30101
message (string) : 'Meeting has already Ended or not Active'
new UserNotJoinedError()

Extends WebexMeetingsError

Properties
code (number) : 30102
message (string) : 'User has already left the meeting'
new NoMediaEstablishedYetError()

Extends WebexMeetingsError

Properties
code (number) : 30103
message (string) : error message
new UserInLobbyError()

Extends WebexMeetingsError

Properties
code (number) : 30104
message (string) : 'user is still in the lobby or not joined'
new SpaceIDDeprecatedError()

Extends WebexMeetingsError

Properties
code (number) : 30105
message (string) : Using the space ID as a destination is no longer supported. Please refer to the migration guide to migrate to use the meeting ID or SIP address.'
new IceGatheringFailed()

Extends WebexMeetingsError

Properties
code (number) : 30202
message (string) : 'user failed ice gathering check network/firewall'
new AddMediaFailed()

Extends WebexMeetingsError

Properties
code (number) : 30203
message (string) : 'Failed to add media'
new WebexMeetingsError(code: number, args: ...Array<any>, message: string?, fileName: string?, lineNumber: number?)

Extends Error

Parameters
code (number) Error code
args (...Array<any>)
message (string?) Error message
fileName (string?) Name of the script file where error was generated
lineNumber (number?) Line number of the script file where error was generated
Properties
code (number) : Error code
Instance Members
toString()

Extended Error object to signify a join meeting error

new JoinMeetingError(options: Object?, message: String?, error: Object?)

Extends Error

Parameters
options (Object? = {})
message (String? = ERROR_DICTIONARY.JOIN_MEETING.MESSAGE)
error (Object? = null)

@description Layout type for remote video participants. Allowed values are: Single, Equal, ActivePresence, Prominent, OnePlusN

LAYOUT_TYPES

Type: array

the values for IP_VERSION are fixed and defined in Orpheus API

IP_VERSION

Type for an StrokeData Object

StrokeData

Type: {deviceId: string, toUserId: string, requesterId: string, content: string, shareInstanceId: string, encryptionKeyUrl: string, version: string}

Properties
deviceId (string)
toUserId (string)
requesterId (string)
content (string)
shareInstanceId (string)
encryptionKeyUrl (string)
version (string)

Type for an annotation Object include annotation version and privilege

AnnotationInfo

Type: {version: string, policy: ANNOTATION_POLICY}

Properties
version (string)
policy (ANNOTATION_POLICY)

Error to indicate that wbxappapi requires a password

new MeetingInfoV2PasswordError(wbxAppApiErrorCode: Number?, meetingInfo: Object?, message: String?)

Extends Error

Parameters
wbxAppApiErrorCode (Number?)
meetingInfo (Object?)
message (String? = PASSWORD_ERROR_DEFAULT_MESSAGE)

Error generating a adhoc space meeting

new MeetingInfoV2AdhocMeetingError(wbxAppApiErrorCode: Number?, message: String?)

Extends Error

Parameters
wbxAppApiErrorCode (Number?)
message (String? = ADHOC_MEETING_DEFAULT_ERROR)

Error preventing join because of a meeting policy

new MeetingInfoV2PolicyError(wbxAppApiErrorCode: Number?, meetingInfo: Object?, message: String?)

Extends Error

Parameters
wbxAppApiErrorCode (Number?)
meetingInfo (Object?)
message (String?)

Error to indicate that preferred webex site not present to start adhoc meeting

new MeetingInfoV2CaptchaError(wbxAppApiErrorCode: Number?, captchaInfo: Object?, message: String?)

Extends Error

Parameters
wbxAppApiErrorCode (Number?)
captchaInfo (Object?)
message (String? = CAPTCHA_ERROR_DEFAULT_MESSAGE)

Raises a MeetingInfoV2PolicyError for policy error codes

handlePolicyError
Parameters
err (any) the error from the request
Returns
void:

Metrics handles all the call metrics events

new Metrics()
Instance Members
initialSetup(webex)
sendBehavioralMetric(metricName, metricFields, metricTags)
prepareMetricFields(payload, prefix)

Converts pane size into h264 maxFs

getMaxFs(paneSize: PaneSize): number
Parameters
paneSize (PaneSize)
Returns
number:

Class representing a remote audio/video stream.

Internally it is associated with a specific receive slot and a media request for it.

new RemoteMedia(receiveSlot: ReceiveSlot, mediaRequestManager: MediaRequestManager, options: Options?)

Extends EventsScope

Parameters
receiveSlot (ReceiveSlot)
mediaRequestManager (MediaRequestManager)
options (Options?)
Instance Members
setSizeHint(width, height)
stop(commit)
sendMediaRequest(csi, commit)
cancelMediaRequest(commit)
mediaType
sourceState
stream
getUnderlyingReceiveSlot()

Events plugin-meetings local Used to emit events internally between modules specific to an object

new EventsScope()

Extends ChildEmitter

Instance Members
emit(scope, eventName, args)

Returns true if two stream requests are the same, false otherwise.

isEqual(streamRequestA: StreamRequest, streamRequestB: StreamRequest): boolean
Parameters
streamRequestA (StreamRequest) Stream request A for comparison.
streamRequestB (StreamRequest) Stream request B for comparison.
Returns
boolean: Whether they are equal.

Clears the previous stream requests.

clearPreviousRequests(): void
Returns
void:

Class representing a receive slot. A single receive slot is able to receive a single track for example some participant's main video or audio

new ReceiveSlot(mediaType: MediaType, mcReceiveSlot: ReceiveSlot, findMemberIdCallback: FindMemberIdCallback)

Extends EventsScope

Parameters
mediaType (MediaType)
mcReceiveSlot (ReceiveSlot)
findMemberIdCallback (FindMemberIdCallback) callback for finding memberId for given CSI
Instance Members
setMaxFs(newFs)
sourceState
findMemberId()
logString
stream
wcmeReceiveSlot
new Presence()

Type: IPresence

Extends WebexPlugin

Static Members
initialize()
emitEvent(event, payload)
enable()
disable()
isEnabled()
get(personId)
list(personIds)
subscribe(personIds, subscriptionTtl)
unsubscribe(personIds)
setStatus(status, ttl)
enqueue(id)
dequeue(id)

The status object

PresenceStatusObject

Type: Object

Properties
url (string) : : Public resource identifier for presence
subject (string) : : User ID for the user the returned composed presence represents
status (string) : : Current composed presence state
statusTime (string) : : DateTime in RFC3339 format that the current status began
lastActive (string) : : DateTime in RFC3339 format that the service last saw activity from the user.
expires (string) : : DEPRECATED - DateTime in RFC3339 format that represents when the current status will expire. Will not exist if expiresTTL is -1.
expiresTTL (Number) : : TTL in seconds until the status will expire. If TTL is -1 the current status has no known expiration.
expiresTime (string) : : DateTime in RFC3339 format that the current status will expire. Missing field means no known expiration.
vectorCounters (Object) : : Used for packet ordering and tracking.
suppressNotifications (Boolean) : : Indicates if notification suppression is recommended for this status.
lastSeenDeviceUrl (string) : : Resource Identifier of the last device to post presence activity for this user.
PresenceStatusesObject

Type: Object

Properties
statusList (Array<PresenceStatusObject>)

Presence Worker Manages fetches and subscriptions for presence

new PresenceWorker()
Instance Members
initialize(webex)
subscriptionUpdate(event)
enqueue(id)
dequeue(id)
checkFetchers()
checkCampers()
checkSubscriptions()
cleanPresences()
groundskeeper()

Helper method to build a roomInfo object from a conversation object

buildRoomInfo(webex: Object, conversation: Conversation~ConversationObject): Promise<RoomInfoObject>
Parameters
webex (Object) sdk object
conversation (Conversation~ConversationObject)
Returns
Promise<RoomInfoObject>:

Helper method to build a list of roomInfo object from conversation list

buildRoomInfoList(webex: Object, conversations: Conversation~ConversationObjectList): Promise<RoomInfoList>
Parameters
webex (Object) sdk object
conversations (Conversation~ConversationObjectList)
Returns
Promise<RoomInfoList>: