The Cisco Webex JS SDK
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:
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.
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:
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:
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
Create a new Webex instance
Webex
:
Create a new Webex instance configured for your OAuth client
const webex = Webex.init({
config: {
credentials: {
authorizationString: `<AUTHORIZATION URL FROM DEVELOPER PORTAL>`
}
}
});
Create a new Webex instance configured for a Bot
const webex = Webex.init({
credentials: `<BOT TOKEN FROM DEVELOPER PORTAL>`
});
Browser support for OAuth2. Automatically parses the URL hash for an access token
Alias of AuthorizationBrowser#isAuthorizing
Type: boolean
Kicks off the Authorization Code grant flow. Typically called via AuthorizationBrowser#initiateLogin
(Object)
Promise
:
Kicks off the Implicit Code grant flow. Typically called via AuthorizationBrowser#initiateLogin
(Object)
Promise
:
Requests a Webex access token for a user already authenticated into your product.
Note: You'll need to supply a jwtRefreshCallback of the form
Promise<jwt> = jwtRefreshCallback(webex)
for automatic token refresh to
work.
Promise
:
Called by WebexCore#logout(). Redirects to the logout page
Promise
:
NodeJS support for OAuth2
Alias of AuthorizationNode#isAuthorizing
Type: boolean
Maintain a cache of meetings and sync with services.
Extends WebexPlugin
(...any)
Creates a noise reduction effect
(INoiseReductionEffect)
optional custom effect options
Promise<effect>
:
noise reduction effect.
Creates a virtual background effect
(IVirtualBackgroundEffect)
optional custom effect options
Promise<effect>
:
virtual background effect.
gets the reachability instance for Meetings
Reachability
:
gets the personal meeting room instance, for saved PMR values for this user
PersonalMeetingRoom
:
Create a meeting or return an existing meeting.
When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
(string)
sipURL, phonenumber, or locus object}
(DESTINATION_TYPE?
= null
)
the optional specified type, such as locusId
(Boolean
= false
)
whether a random delay should be added to fetching meeting info
(Object
= {}
)
extra parameters to be provided when fetching meeting info
(string
= undefined
)
the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
(Boolean
= false
)
whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
(CallStateForMetrics
= undefined
)
information about call state for metrics
(Object?
= undefined
)
Pre-fetched complete meeting info
(String?
= undefined
)
meeting info prefetch url
(string
= undefined
)
the optional specified sessionCorrelationId (callStateForMetrics.sessionCorrelationId) can be provided instead
Promise<Meeting>
:
A new Meeting.
Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
(boolean
= {}
)
whether the sync should keep only locus meetings or any other meeting in meetingCollection
Name | Description |
---|---|
keepOnlyLocusMeetings.keepOnlyLocusMeetings any
(default true )
|
Promise<void>
:
The PersonalMeetingRoom object to interact with server
Type: Object
If the meetings plugin has been registered and listening via Meetings#register
Type: Boolean
Uploads logs to the webex services for tracking
String
:
feedback ID logs were submitted under
The property name for what collection will be stored, i.e., this.meetingInfos, this.meetings, etc.
Type: String
Meetings Ready Event Emitted when the meetings instance on webex is ready
Meetings Network Disconnected Event Emitted when the meetings instance is disconnected from the internal mercury server
Meetings Registered Event Emitted when the meetings instance has been registered and listening
Meeting Removed Event Emitted when a meeting was removed from the cache of meetings
Type: Object
Meeting is the crux of the plugin
Checks if the supplied password/host key is correct. It returns a promise with information whether the password and captcha code were correct or not.
(String)
this can be either a password or a host key, can be undefined if only captcha was required
(String)
can be undefined if captcha was not required by the server
(Boolean
= false
)
whether Call Analyzer events should be sent when fetching meeting information
Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>
:
Admit the guest(s) to the call once they are waiting. If the host/cohost is in a breakout session, the locus url of the session must be provided as the authorizingLocusUrl. Regardless of host/cohost location, the locus Id (lid) in the path should be the locus Id of the main, which means the locus url of the api call must be from the main session. If these loucs urls are not provided, the function will do the check.
Promise
:
see #members.admitMembers
Shorthand function to join AND set up media
(Object
= {}
)
options to join with media
Name | Description |
---|---|
options.joinOptions JoinOptions?
|
see #join() |
options.mediaOptions AddMediaOptions?
|
see #addMedia() |
Promise
:
-- {join: see join(), media: see addMedia()}
joinWithMedia({
joinOptions: {resourceId: 'resourceId' },
mediaOptions: {
localStreams: { microphone: microphoneStream, camera: cameraStream }
}
})
Internal version of addMedia() with some more arguments for finer control of its behavior
(Function)
callback to determine the icePhase for CA "client.ice.end" failure events
(TurnServerInfo)
TURN server information
(boolean)
if true, TURN discovery will be done
(AddMediaOptions
= {}
)
same as options of the public addMedia() method
Promise<void>
:
Checks if there are any queued media updates and runs the first one from the queue if we are in a state that allows doing that.
undefined
:
Updates the media connection - it allows to enable/disable all audio/video/share in the meeting. This does not affect the published tracks, so for example if a microphone track is published and updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore, but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called, the sending of the audio from the same track will resume.
(Object)
Name | Description |
---|---|
options.audioEnabled boolean
|
[optional] enables/disables receiving and sending of main audio in the meeting |
options.videoEnabled boolean
|
[optional] enables/disables receiving and sending of main video in the meeting |
options.shareEnabled boolean
|
[optional] enables/disables receiving and sending of screen share in the meeting |
Promise
:
Leave the current meeting
(Object
= {}as any
)
leave options
Name | Description |
---|---|
options.resourceId String?
|
the device with which to leave from, empty if just the computer |
options.clientEventLeaveReason String?
|
the leaveReason to include in the Call Analyzer event. Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason) https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796 |
options.reason String?
|
only used for logging |
Promise
:
Sends request to change layout type for the current meeting for the specific participant/device only
(Object
= {}as any
)
preferred dimensions for the remote main and content streams (server can ignore it)
Name | Description |
---|---|
renderInfo.main Object
|
preferred dimensions for the remote main video stream |
renderInfo.main.width Number
|
preferred width of main video stream |
renderInfo.main.height Number
|
preferred height of main video stream |
renderInfo.content Object
|
preferred dimensions for the remote content share stream |
renderInfo.content.width Number
|
preferred width of content share stream |
renderInfo.content.height Number
|
preferred height of content share stream |
Promise
:
Send a reaction inside the meeting.
(ReactionServerType)
type of reaction to be sent. Example: "thumbs_up"
(SkinToneType)
skin tone for the reaction. Example: "medium_dark"
Promise
:
Call state used for metrics
Type: CallStateForMetrics
Type: Annotation
helper class for managing receive slots (for multistream media connections)
Object containing helper classes for managing media requests for audio/video/screenshare (for multistream media connections) All multistream media requests sent out for this meeting have to go through them.
Type: MeetingStateMachine
If true, then media is sent over multiple separate streams. If false, then media is transcoded by the server into a single stream.
Passing only info as we send basic info for meeting added event
Type: MediaProperties
Type: InMeetingActions
Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called with the correct password before calling join()
Type: PASSWORD_STATUS
Information about required captcha. If null, then no captcha is required. status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called with the correct password before calling join()
Type: Object
The class that helps to control recording functions: start, stop, pause, resume, etc
Type: RecordingController
The class that helps to control recording functions: start, stop, pause, resume, etc
Type: ControlsOptionsManager
helper class for managing remote streams
Reason why TURN discovery is skipped.
Type: string
Getter - Returns callStateForMetrics.sessionCorrelationId
string
:
Add pre-fetched meeting info
The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
(Object)
Complete meeting info
(FetchMeetingInfoParams)
Fetch parameters for validation
Promise<void>
:
Sets the self user policies based on the contents of the permission token
void
:
Removes references to local streams. This function should be called on cleanup when we leave the meeting etc.
void
:
This method stops receiving transcription for the current meeting
void
:
Handles ROAP_FAILURE event from the webrtc media connection
(Error)
void
:
Handles an incoming Roap message
(RoapMessage)
roap message
undefined
:
This function makes sure we send the right metrics when local and remote SDPs are processed/generated
undefined
:
Returns a promise that will resolve to fetch options for leaving a meeting.
This is to support quickly submitting a leave request when the browser/tab is closing. Calling meeting.leave will not work because there are some async steps that will not complete before the browser is closed. Instead, we pre-gather all the information/options needed for the request(s), and then simply and quickly fire the fetch(es) when pagehide is triggered.
We must use fetch instead of request because fetch has a keepalive option that allows the request it to outlive the page.
Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will properly adjust them before submitting.
Promise
:
resolves to options to be used with fetch
Gets permission token expiry information including timeLeft, expiryTime, currentTime (from the time the function has been fired)
object
:
permissionTokenExpiryInfo
number
:
permissionTokenExpiryInfo.timeLeft The time left for token to expire
number
:
permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server
number
:
permissionTokenExpiryInfo.currentTime The current time of the local machine
Meeting State Change Event Emitted when ever there is a meeting state change
Type: Object
Meeting Ringing Event Emitted when this client should play a ringing sound, because this member is getting an incoming meeting or sending out an incoming meeting
Type: Object
Meeting Started Sharing Local Event Emitted when this member starts sharing
Type: Object
Meeting Stopped Sharing Local Event Emitted when this member stops sharing
Type: Object
Meeting Started Sharing Remote Event Emitted when remote sharing starts
Type: Object
Meeting Stopped Sharing Remote Event Emitted when remote screen sharing ends
Type: Object
Meeting Actions Update Event Emitted when a user can take actions on a meeting such as lock, unlock, assign host
Type: Object
Meeting Muted By Others Event Emitted when a member is muted by another member
Type: Object
Reconnection Starting Event Emitted when reconnection of media to the active meeting was successful
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.
Register to listen for incoming attachmentAction events
This is an alternate approach to registering for attachmentAction webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
The attachmentActions.listen() event objects can also include additional fields not
available in the webhook's JSON payload, specifically: inputs
.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.attachmentActions.listen()
.then(() => {
console.log('listening to attachmentActions events');
webex.attachmentActions.on('created', (event) => console.log(`Got an attachmentActions:created event:\n${event}`));
})
.catch((e) => console.error(`Unable to register for attachmentAction events: ${e}`));
// Some app logic...
// WHen it is time to cleanup
webex.attachmentActions.stopListening();
webex.attachmentActions.off('created');
Register to listen for incoming messages events
This is an alternate approach to registering for messages webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
The messages.listen() event objects can also include additional fields not
available in the webhook's JSON payload: text
, markdown
, and files
.
These fields are available when their details are included in the web socket's
activity
object. Retrieving other fields, such as the html
field,
will require a manual request to get the corresponding message object.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.messages.listen()
.then(() => {
console.log('listening to message events');
webex.messages.on('created', (event) => console.log(`Got a message:created event:\n${event}`));
webex.messages.on('deleted', (event) => console.log(`Got a message:deleted event:\n${event}`));
})
.catch((e) => console.error(`Unable to register for message events: ${e}`));
// Some app logic...
// When it is time to cleanup
webex.messages.stopListening();
webex.messages.off('created');
webex.messages.off('deleted');
Post a new message and/or media content into a room.
(MessageObject)
Promise<MessageObject>
:
webex.rooms.create({title: 'Create Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(message) {
var assert = require('assert');
assert(message.id);
assert(message.personId);
assert(message.personEmail);
assert(message.roomId);
assert(message.created);
return 'success';
});
// => success
Put an updated message and/or media content into a room instead of existing message.
(MessageObject)
(MessageObject)
Promise<MessageObject>
:
webex.rooms.create({title: 'Create Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message = m;
return webex.messages.update(message,{markdown:`**What up**`});
})
.then(function(m) {
message = m;
return webex.messages.update(message.id,{roomId:message.roomId,text:'Howdy!'});
})
.then(function(message) {
var assert = require('assert');
assert(message.id);
assert(message.personId);
assert(message.personEmail);
assert(message.roomId);
assert(message.created);
return 'success';
});
// => success
Returns a single message.
((RoomObject | string))
Promise<MessageObject>
:
var message;
webex.rooms.create({title: 'Get Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message = m;
return webex.messages.get(message.id);
})
.then(function(message2) {
var assert = require('assert');
assert.deepEqual(message2, message);
return 'success';
});
// => success
Returns a list of messages. In most cases the results will only contain messages posted in rooms that the authenticated user is a member of.
Promise<Page<MessageObject>>
:
var message1, message2, room;
webex.rooms.create({title: 'List Messages Example'})
.then(function(r) {
room = r;
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message1 = m;
return webex.messages.create({
text: 'How are you?',
roomId: room.id
});
})
.then(function(m) {
message2 = m;
return webex.messages.list({roomId: room.id});
})
.then(function(messages) {
var assert = require('assert');
assert.equal(messages.length, 2);
assert.equal(messages.items[0].id, message2.id);
assert.equal(messages.items[1].id, message1.id);
return 'success';
});
// => success
Deletes a single message. Deleting a message will notify all members of the room that the authenticated user deleted the message. Generally, users can only delete their own messages except for the case of Moderated Rooms and Org Administrators.
((MessageObject | uuid))
Promise
:
}
var message1, room;
webex.rooms.create({title: 'Messages Example'})
.then(function(r) {
room = r;
return webex.messages.create({
text: 'Howdy!',
roomId: room.id
});
})
.then(function(m) {
message1 = m;
return webex.messages.create({
text: 'How are you?',
roomId: room.id
});
})
.then(function() {
return webex.messages.remove(message1);
})
.then(function() {
return webex.messages.list({roomId: room.id});
})
.then(function(messages) {
var assert = require('assert');
assert.equal(messages.items.length, 1);
assert(messages.items[0].id !== message1.id);
return 'success';
});
// => success
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.
Register to listen for incoming membership events
This is an alternate approach to registering for membership webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.memberships.listen()
.then(() => {
console.log('listening to membership events');
webex.memberships.on('created', (event) => {
console.log(`Got a membership:created event:\n${event}`);
}
webex.memberships.on('updated', (event) => {
console.log(`Got a membership:updated event:\n${event}`);
}
webex.memberships.on('seen', (event) => {
// This represents a "read receipt" and will include a
// lastSeenId for the message this member has just "read",
// There is currently no equivalent webhook for this event.
console.log(`Got a membership:seen event:\n${event}`);
}
webex.memberships.on('deleted', (event) => => {
console.log(`Got a membership:created event:\n${event}`);
}
})
.catch((e) => console.error(`Unable to register for membership events: ${e}`));
// App logic goes here...
// Later when it is time to clean up
webex.memberships.stopListening();
webex.memberships.off('created');
webex.memberships.off('updated');
webex.memberships.off('seen');
webex.memberships.off('deleted');
Adds a person to a room. The person can be added by ID (personId
) or by
Email Address (personEmail
). The person can be optionally added to the room
as a moderator.
(MembershipObject)
Promise<MembershipObject>
:
webex.rooms.create({title: 'Create Membership Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
var assert = require('assert');
assert(membership.id);
assert(membership.roomId);
assert(membership.personId);
assert(membership.personEmail);
assert('isModerator' in membership);
assert('isMonitor' in membership);
assert(membership.created);
return 'success';
});
// => success
Returns a single membership.
((MembershipObject | uuid))
Promise<MembershipObject>
:
var membership;
webex.rooms.create({title: 'Get Membership Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(m) {
membership = m;
return webex.memberships.get(m.id);
})
.then(function(m) {
var assert = require('assert');
assert.deepEqual(m, membership);
return 'success';
});
// => success
Returns a list of memberships. In most cases the results will only contain rooms that the authenticated user is a member of. You can filter the results by room to list people in a room or by person to find rooms that a specific person is a member of.
Promise<Page<MembershipObject>>
:
var room;
webex.rooms.create({title: 'List Membership Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function() {
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 2);
for (var i = 0; i < memberships.length; i+= 1) {
assert.equal(memberships.items[i].roomId, room.id);
}
return 'success';
});
// => success
Returns a list of memberships with details about the lastSeenId for each user, allowing a client to indicate "read status" in a space GUI
This differs from the memberships.list() function in the following ways: -- it accepts only a room or object with a valid roomId -- no other options, eg: max, are considered -- results are not paginated -- memberships in the return do not include the "created", "isRoomHidden", fields -- memberships in the return do include the new "lastSeenId", and "lastSeenDate" fields these will not exist if the member has never "seen" the space
In general this function should be used only when the client needs to access read status info.
This function may be deprecated when this info is provided in the membership objects returned in the list function.
Promise<MembershipObjectList>
:
Deletes a single membership.
((MembershipObject | uuid))
Promise
:
var membership, room;
webex.rooms.create({title: 'Remove Membership Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(m) {
membership = m;
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 2);
return webex.memberships.remove(membership);
})
.then(function() {
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
var assert = require('assert');
assert.equal(memberships.length, 1);
return 'success';
});
// => success
Used to update a single membership's properties
((MembershipObject | uuid))
Promise<MembershipObject>
:
// Change membership to make user a moderator
var membership, room;
webex.rooms.create({title: 'Memberships Example'})
.then(function(r) {
room = r;
return webex.memberships.list({roomId: room.id});
})
.then(function(memberships) {
membership = memberships.items[0];
var assert = require('assert');
assert.equal(membership.isModerator, false);
membership.isModerator = true;
return webex.memberships.update(membership);
})
.then(function() {
return webex.memberships.get(membership.id);
})
.then(function(membership) {
var assert = require('assert');
assert.equal(membership.isModerator, true);
return 'success';
});
// => success
// Hide a one on one space
var assert = require('assert');
var membership, myId;
webex.people.get('me')
.then(function(person) {
myId = personId;
return webex.messages.create({
toPersonEmail: 'otherUser@acme.com',
text: 'This message will create a 1-1 space'
});
})
then(function(message) {
return webex.memberships.list({
roomId: message.roomId,
personId: myId
});
})
.then((memberships) => {
membership = memberships.items[0];
assert.equal(membership.isRoomHidden, false);
membership.isRoomHidden = true;
// This will generate a memberships:updated event
// that will only be seen by this user
return webex.memberships.update(membership);
})
.then(function(membership) {
assert.equal(membership.isRoomHidden, true);
return 'success';
});
// => success
Updates the lastSeenId attribute of a membership. Call this method to send a "read receipt" for a given message. This will update the lastSeenId for the user's membership in space where the message is.
(string)
Promise<MembershipObject>
:
Returns a single person by ID
((PersonObject | uuid | string))
Promise<PersonObject>
:
webex.rooms.create({title: 'Get Person Example'})
.then(function(room) {
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
return webex.people.get(membership.personId);
})
.then(function(alice) {
var assert = require('assert');
assert(alice.id);
assert(Array.isArray(alice.emails));
assert.equal(alice.emails.filter(function(email) {
return email === 'alice@example.com';
}).length, 1);
assert(alice.displayName);
assert(alice.created);
return 'success';
});
// => success
Returns a list of people
Name | Description |
---|---|
options.email email
|
Returns people with an email that contains this string |
options.displayName string
|
Returns people with a name that contains this string |
(bool)
optional flag that requires Hydra to send every type field,
even if the type is not "person" (e.g.: SX10, webhook_integration, etc.)
Promise<Page<PersonObject>>
:
var room;
webex.rooms.create({title: 'List People Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function() {
return webex.memberships.create({
personEmail: 'bob@example.com',
roomId: room.id
});
})
.then(function() {
return webex.people.list({email: 'alice@example.com'});
})
.then(function(people) {
var assert = require('assert');
assert.equal(people.length, 1);
var person = people.items[0];
assert(person.id);
assert(Array.isArray(person.emails));
assert(person.displayName);
assert(person.created);
return 'success';
});
// => success
Example usage of array method
var room;
var aliceId;
var bobId;
webex.rooms.create({title: 'List People Array Example'})
.then(function(r) {
room = r;
return webex.memberships.create({
personEmail: 'alice@example.com',
roomId: room.id
});
})
.then(function(membership) {
aliceId = membership.personId;
})
.then(function() {
return webex.memberships.create({
personEmail: 'bob@example.com',
roomId: room.id
});
})
.then(function(membership) {
bobId = membership.personId;
})
.then(function() {
return webex.people.list([aliceId, bobId]);
})
.then(function(people) {
var assert = require('assert');
assert.equal(people.length, 2);
var person = people.items[0];
assert(person.id);
assert(Array.isArray(person.emails));
assert(person.displayName);
assert(person.created);
return 'success';
});
// => success
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.
Register to listen for incoming rooms events
This is an alternate approach to registering for rooms webhooks.
The events passed to any registered handlers will be similar to the webhook JSON,
but will omit webhook specific fields such as name, secret, url, etc.
To utilize the listen()
method, the authorization token used
will need to have spark:all
and spark:kms
scopes enabled.
Note that by configuring your application to enable or disable spark:all
via its configuration page will also enable or disable spark:kms
.
See the Sample App
for more details.
Promise
:
webex.rooms.listen()
.then(() => {
console.log('listening to room events');
webex.rooms.on('created', (event) => console.log(`Got a room:created event:\n${event}`);
webex.rooms.on('updated', (event) => console.log(`Got a room:updated event:\n${event}`);
})
.catch((e) => console.error(`Unable to register for room events: ${e}`));
// Some app logic...
// WHen it is time to cleanup
webex.rooms.stopListening();
webex.rooms.off('created');
webex.rooms.off('updated');
Creates a new room. The authenticated user is automatically added as a member of the room. See the Memberships API to learn how to add more people to the room.
(RoomObject)
Promise<RoomObject>
:
webex.rooms.create({title: 'Create Room Example'})
.then(function(room) {
var assert = require('assert')
assert(typeof room.created === 'string');
assert(typeof room.id === 'string');
assert(room.title === 'Create Room Example');
console.log(room.title);
return 'success';
});
// => success
Returns a single room.
((RoomObject | string))
(Object)
Promise<RoomObject>
:
var room;
webex.rooms.create({title: 'Get Room Example'})
.then(function(r) {
room = r
return webex.rooms.get(room.id)
})
.then(function(r) {
var assert = require('assert');
assert.deepEqual(r, room);
return 'success';
});
// => success
Returns a list of rooms. In most cases the results will only contain rooms that the authenticated user is a member of.
Promise<Page<RoomObject>>
:
var createdRooms;
Promise.all([
webex.rooms.create({title: 'List Rooms Example 1'}),
webex.rooms.create({title: 'List Rooms Example 2'}),
webex.rooms.create({title: 'List Rooms Example 3'})
])
.then(function(r) {
createdRooms = r;
return webex.rooms.list({max: 3})
.then(function(rooms) {
var assert = require('assert');
assert(rooms.length === 3);
for (var i = 0; i < rooms.items.length; i+= 1) {
assert(createdRooms.filter(function(room) {
return room.id === rooms.items[i].id;
}).length === 1);
}
return 'success';
});
});
// => success
Returns a list of rooms with details about the data of the last activity in the room, and the date of the users last presences in the room. The list is sorted with this with most recent activity first
For rooms where lastActivityDate > lastSeenDate the space can be considered to be "unread"
This differs from the rooms.list() function in the following ways: -- when called with no parameters it returns an array of all spaces, up to 1000, that the user is a member of -- pagination is not supported. ALL rooms are returned which can result in a large payload -- For users with hundreds of spaces, this API can take some time to to return, for this reason it supports an optional maxRecent parameter. If set this will return only the specified number of spaces with activity in the last two weeks. Recommended value is 30. Max supported is 100. -- only "id", "type", "lastActivityDate", and "lastSeenDate" are guaranteed to be available for each room in the list -- "title" is usually returned, but not guaranteed
In general this function should be used only when the client needs to access read status info, for example on startup. After startup, clients should track message and membership:seen events to maintain read status client side.
Since this API can take some time to return up to 1000 spaces, it is recommended that custom clients call this first with the maxRecent parameter set to 30, so that they can display some of the more recents spaces. Calling this API a second time with no parameters will return all the spaces.
Not all spaces may be returned, for example when users in more than 1000 spaces, or when a new spaces is added after this function is called, but before it returns. Custom clients should be prepared to gracefully handle cases where an event occurs in a space not returned by this call, by querying rooms.getWithReadStatus() with the id of the room in question
This function may be deprecated when this info is provided in the membership objects returned in the list function.
(int
= 0
)
Promise<RoomInfoObjectList>
:
Returns a single room object with details about the data of the last activity in the room, and the date of the users last presence in the room.
For rooms where lastActivityDate > lastSeenDate the room can be considered to be "unread"
This differs from the rooms.get() function in the following ways: -- it takes a single roomId parameter to fetch -- no other options are considered -- only "id", "type", "lastActivityDate", and "lastSeenDate" are guaranteed to be available in the return object -- "title" is usually returned, but not guaranteed
In general clients should use the listWithReadStatus() method on startup to get the initial roomStatus and then update their client side copy by responding to message, membership and room events.
This function allows a custom client to be "nimble" if it is responding to an event with a roomId that was not in the original fetch. The anticipated behavior is that getWithReadStats is called "just in time", with the resulting room object being added to the list of cached room objects on the client side.
This function may be deprecated when this info is provided in the room object returned in the get function.
(string)
Promise<RoomInfoObject>
:
Deletes a single room.
((RoomObject | string))
Promise
:
var room;
webex.rooms.create({title: 'Remove Room Example'})
.then(function(r) {
room = r;
return webex.rooms.remove(room.id);
})
.then(function() {
return webex.rooms.get(room.id);
})
.then(function() {
var assert = require('assert');
assert(false, 'the previous get should have failed');
})
.catch(function(reason) {
var assert = require('assert');
assert.equal(reason.statusCode, 404);
return 'success'
});
// => success
Used to update a single room's properties.
(RoomObject)
Promise<RoomObject>
:
var room;
webex.rooms.update({title: 'Update Room Example'})
.then(function(r) {
room = r;
room.title = 'Update Room Example (Updated Title)';
return webex.rooms.update(room);
})
.then(function() {
return webex.rooms.get(room.id);
})
.then(function(room) {
var assert = require('assert');
assert.equal(room.title, 'Update Room Example (Updated Title)');
return 'success';
});
// => success
Create a new team.
(TeamObject)
Promise<TeamObject>
:
webex.teams.create({name: 'Create Team Example'})
.then(function(team) {
var assert = require('assert');
assert(team.id);
assert(team.name);
assert(team.created);
return 'success';
});
// => success
Returns a single team
((TeamObject | string))
(Object)
Promise<TeamObject>
:
var team;
webex.teams.create({name: 'Get Team Example'})
.then(function(r) {
team = r;
return webex.teams.get(team.id);
})
.then(function(team2) {
var assert = require('assert');
assert.equal(team2.id, team.id);
return 'success';
});
// => success
List teams.
Promise<Page<TeamObject>>
:
var createdRooms;
Promise.all([
webex.teams.create({name: 'List Teams Example 1'}),
webex.teams.create({name: 'List Teams Example 2'}),
webex.teams.create({name: 'List Teams Example 3'})
])
.then(function(r) {
createdRooms = r;
return webex.teams.list({max: 3});
})
.then(function(teams) {
var assert = require('assert');
assert(teams.length === 3);
for (var i = 0; i < teams.items.length; i+= 1) {
assert(createdRooms.filter(function(room) {
return room.id === teams.items[i].id;
}).length === 1);
}
return 'success';
});
// => success
Update a team.
(TeamObject)
Promise<TeamObject>
:
var teams;
webex.teams.create({name: 'Update Team Example'})
.then(function(r) {
teams = r;
teams.name = 'Teams Example (Updated Title)';
return webex.teams.update(teams);
})
.then(function() {
return webex.teams.get(teams.id);
})
.then(function(teams) {
var assert = require('assert');
assert.equal(teams.name, 'Teams Example (Updated Title)');
return 'success';
});
// => success
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.
Add someone to a team by Person ID or email address; optionally making them a moderator.
(TeamMembershipObject)
Promise<TeamMembershipObject>
:
webex.teams.create({name: 'Create Team Membership Example'})
.then(function(team) {
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(membership) {
var assert = require('assert');
assert(membership.id);
assert(membership.teamId);
assert(membership.personId);
assert(membership.personEmail);
assert('isModerator' in membership);
assert(membership.created);
return 'success';
});
// => success
Get details for a membership by ID.
((TeamMembershipObject | string))
Promise<TeamMembershipObject>
:
var membership;
webex.teams.create({name: 'Get Team Memberships Example'})
.then(function(team) {
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(m) {
membership = m;
return webex.teamMemberships.get(m.id);
})
.then(function(m) {
var assert = require('assert');
assert.deepEqual(m, membership);
return 'success';
});
// => success
Lists all team memberships. By default, lists memberships for teams to which the authenticated user belongs.
[type]
:
var team;
webex.teams.create({name: 'List Team Memberships Example'})
.then(function(t) {
team = t;
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function() {
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 2);
for (var i = 0; i < teamMemberships.length; i+= 1) {
assert.equal(teamMemberships.items[i].teamId, team.id);
}
return 'success';
});
// => success
Deletes a membership by ID.
((TeamMembershipObject | string))
Promise
:
var membership, team;
webex.teams.create({name: 'Remove Team Memberships Example'})
.then(function(t) {
team = t;
return webex.teamMemberships.create({
personEmail: 'alice@example.com',
teamId: team.id
});
})
.then(function(m) {
membership = m;
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 2);
return webex.teamMemberships.remove(membership);
})
.then(function() {
return webex.teamMemberships.list({teamId: team.id});
})
.then(function(teamMemberships) {
var assert = require('assert');
assert.equal(teamMemberships.length, 1);
return 'success';
});
// => success
Updates properties for a membership.
(TeamMembershipObject)
Promise<TeamMembershipObject>
:
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.
Posts a webhook.
(WebhookObject)
Promise<Webhook>
:
webex.rooms.create({title: 'Create Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(webhook) {
var assert = require('assert');
assert(webhook.id);
assert(webhook.resource);
assert(webhook.event);
assert(webhook.filter);
assert(webhook.targetUrl);
assert(webhook.name);
return 'success';
});
// => success
Shows details for a webhook.
((Webhook | string))
Promise<Webhook>
:
var webhook;
webex.rooms.create({title: 'Get Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.get(webhook.id);
})
.then(function(webhook2) {
var assert = require('assert');
assert.deepEqual(webhook2, webhook);
return 'success';
});
// => success
Lists all webhooks.
(Object)
Name | Description |
---|---|
options.max integer
|
Limit the maximum number of webhooks in the response. |
Promise<Array<Webhook>>
:
var room, webhook;
webex.rooms.create({title: 'List Webhooks Example'})
.then(function(r) {
room = r;
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.list();
})
.then(function(webhooks) {
var assert = require('assert');
assert.equal(webhooks.items.filter(function(w) {
return w.id === webhook.id;
}).length, 1);
return 'success';
});
// => success
Delete a webhook.
((Webhook | string))
Promise
:
var room, webhook;
webex.rooms.create({title: 'Remove Webhook Example'})
.then(function(r) {
room = r;
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
return webex.webhooks.remove(webhook);
})
.then(function() {
return webex.webhooks.list();
})
.then(function(webhooks) {
var assert = require('assert');
assert.equal(webhooks.items.filter(function(w) {
return w.id === webhook.id;
}).length, 0);
return 'success';
});
// => success
Update a webhook.
(Webhook)
Promise<Webhook>
:
var webhook;
webex.rooms.create({title: 'Webhook Example'})
.then(function(room) {
return webex.webhooks.create({
resource: 'messages',
event: 'created',
filter: 'roomId=' + room.id,
targetUrl: 'https://example.com/webhook',
name: 'Test Webhook'
});
})
.then(function(w) {
webhook = w;
webhook.targetUrl = 'https://example.com/webhook/newtarget';
return webex.webhooks.update(webhook);
})
.then(function() {
return webex.webhooks.get(webhook);
})
.then(function(webhook) {
var assert = require('assert');
assert.equal(webhook.targetUrl, 'https://example.com/webhook/newtarget');
return 'success';
});
// => success
Type: Object
(string?)
: Maximum log level that
should be printed to the console. One of
silent|error|warn|log|info|debug|trace
(number?)
: Maximum number of entries to store in the log buffer.
{
level: process.env.WEBEX_LOG_LEVEL,
historyLength: 1000
}
The following typedefs describes the responses of the various API calls.
Type: Object
(string)
: Unique identifier for the membership
(string)
: The room ID
(string)
: The person ID
(email)
: The email address of the person / room member
(boolean)
: Indicates whether the specified person should be a room moderator
(boolean)
: Indicates whether the specified member is a room monitor
(isoDate)
: The date and time that this membership was created
Type: Object
(string)
: (server generated) Unique identifier for the message
(string)
: The ID for the author of the message
(email)
: The email for the author of the message
(string)
: The ID for the room of the message
(string)
: The message posted to the room in plain text
(string)
: The message posted to the room in markdown
(Array<string>)
: The source URL(s) for the message attachment(s).
See the
Message Attachments
Guide for a list of supported media types.
(isoDate)
: (server generated) The date and time that the message was created
Type: Object
Type: Object
(string)
: (server generated) Unique identifier for the room
(string)
: The display name for the room. All room members
will see the title so make it something good
(string)
: (optional) The ID of the team to which the room
belongs
(isoDate)
: (server generated) The date and time that the
room was created
Type: Object
Type: Object
Type: Object
(string)
: (server generated) Unique identifier for the webhook
(string)
: The resource type for the webhook
(string)
: The event type for the webhook
(string)
: The filter that defines the webhook scope
(string)
: The URL that receives POST requests for each event
(string)
: A user-friendly name for this webhook
(string)
: (server generated) The date and time that the webhook was created
An email address, as a string.
Type: string
The date and time, specified in ISO 8601 extended offset date/time
format (e.g. 2015-10-18T14:26:16+00:00
).
Type: string
Type: Object
(string)
: (server generated) Unique identifier for the attachment action
(string)
: The ID of the message in which attachment action is to be performed
(string)
: The type of attachment action eg., submit
(Object)
: The inputs for form fields in attachment message
(string)
: (server generated) The ID for the author of the attachment action
(string)
: (server generated) The ID for the room of the message
(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
Post a new attachment action for a message with attachment.
(AttachmentActionObject)
Promise<AttachmentActionObject>
:
webex.rooms.create({title: 'Create Message with card Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id,
attachments:[ {
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
type: 'AdaptiveCard',
version: '1.0',
body: [
{
type: 'TextBlock',
text: '',
size: 'large'
},
{
type: 'TextBlock',
text: 'Adaptive Cards',
separation: 'none'
}
{
type: 'Input.Date',
id: 'dueDate'
}
],
actions: [
{
type: 'Action.Submit',
title: 'Due Date'
}
]
}
}]
});
})
.then(function(message) {
return webex.attachmentActions.create({
type: 'submit',
messageId: message.id,
inputs:{
dueDate: '26/06/1995'
}
})
.then(function(attachmentAction)){
var assert = require('assert');
assert(attachmentAction.id);
assert(attachmentAction.type);
assert(attachmentAction.personId);
assert(attachmentAction.inputs);
assert(attachmentAction.messageId);
assert(attachmentAction.roomId);
assert(attachmentAction.created);
return 'success';
}
});
// => success
Returns a single attachment action.
(string)
Promise<AttachmentActionObject>
:
var attachmentAction;
webex.rooms.create({title: 'Get Message Example'})
.then(function(room) {
return webex.messages.create({
text: 'Howdy!',
roomId: room.id,
attachments:[ {
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
type: 'AdaptiveCard',
version: '1.0',
body: [
{
type: 'TextBlock',
text: '',
size: 'large'
},
{
type: 'TextBlock',
text: 'Adaptive Cards',
separation: 'none'
},
{
type: 'Input.Date',
id: 'dueDate'
}
],
actions: [
{
type: 'Action.Submit',
title: 'Due Date'
}
]
}
}]
});
})
.then(function(message) {
return webex.attachmentActions.create({
type: 'submit',
messageId: message.id,
inputs:{
dueDate: '26/06/1995'
});
})
.then(function(attachmentAction) {
return webex.attachmentActions.get(attachmentAction.id)
})
.then(function(attachmentAction){
var assert = require('assert');
assert.deepEqual(attachmentAction, attachmentAction);
return 'success';
})
// => success
Gets a list of all recent devices associated with the user the device list gets populated from Redis
Promise<Device>
:
Gets a list of all recent devices associated with the user the device list gets populated from Redis
Promise<Device>
:
Search for a device by name
Promise<Device>
:
Caches the device info and also registers to Redis for subsequent fetches
deviceInfo
:
Retreives device info of a particular device
(string)
Promise<deviceInfo>
:
Unregisters the device from Redis, will not fetch in subsequent loads, similar to space.deleteBinding()
(string)
Promise<deviceInfo>
:
Requests to display PIN on the device
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()
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()
Promise<deviceInfo>
:
binds the space to the paired device (if supported) similar to space.bindConversation()
Promise<deviceInfo>
:
unbinds the space to the paired device (if supported) similar to space.unbindConversation()
Promise<deviceInfo>
:
Gets the audio state of the paired device similar to device.getAudioState()
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()
Promise<audioState>
:
Mutes paired device similar to device.mute()
Promise<audioState>
:
Unmutes paired device similar to device.unmute()
Promise<audioState>
:
Increases paired device's volume similar to device.increaseVolume()
Promise<audioState>
:
Decreases paired device's volume similar to device.decreaseVolume()
Promise<audioState>
:
Sets paired device's volume but should use increase and decrease api instead similar to device.setVolume()
(number
= 0
)
Promise<audioState>
:
Utility function to update decrypted device name on device object
(Array
= []
)
device
:
Utility function to update decrypted device name on device object
(object
= {}
)
device
:
Utility function to update device info on mercury updates
(object)
device
:
MediaDirection
Type: Object
MediaDirection
Type: Object
SendOptions
Type: Object
(Object)
Type: any
make a browser call to get the media
(SendOptions)
(Object)
SDK Configuration for meetings plugin
Promise
:
creates a webrtc media connection with provided tracks and mediaDirection configuration
(boolean)
(string)
string useful for debugging (will appear in media connection logs)
(string)
id for the meeting using this connection
(Object)
Name | Description |
---|---|
options.mediaProperties Object?
|
contains mediaDirection and local tracks: audioTrack, videoTrack, shareVideoTrack, and shareAudioTrack |
options.remoteQualityLevel string?
|
LOW|MEDIUM|HIGH applicable only to non-multistream connections |
options.enableRtx boolean?
|
applicable only to non-multistream connections |
options.enableExtmap boolean?
|
applicable only to non-multistream connections |
options.turnServerInfo Object?
|
|
options.bundlePolicy BundlePolicy?
|
(RoapMediaConnection | MultistreamRoapMediaConnection)
:
generates share streams
(Object)
parameter
Name | Description |
---|---|
options.sendAudio Boolean
|
send audio from the display share |
options.sendShare Boolean
|
send video from the display share |
options.sharePreferences Object
|
|
options.sharePreferences.shareConstraints MediaTrackConstraints
|
constraints to apply to video |
options.sharePreferences.highFrameRate Boolean
|
if shareConstraints isn't provided, set default values based off of this boolean |
(Object
= {}
)
SDK Configuration for meetings plugin
Promise<MediaStream>
:
Toggle a specific stream noop as of now, does nothing
null
:
Stop input stream
(LocalStream)
A local stream
null
:
generates streams for audio video and share
(object)
parameter
Name | Description |
---|---|
mediaSetting.sendAudio Object
|
sendAudio: {Boolean} sendAudio constraints |
mediaSetting.sendVideo Object
|
sendVideo: {Boolean} sendVideo constraints |
mediaSetting.sendShare Object
|
sendShare: {Boolean} sendShare constraints |
mediaSetting.isSharing Object
|
isSharing: {Boolean} isSharing constraints |
(Object)
parameter
Name | Description |
---|---|
audioVideo.audio Object
|
{deviceId: {String}} |
audioVideo.video Object
|
{deviceId: {String}} |
(Object)
parameter
Name | Description |
---|---|
sharePreferences.shareConstraints Object
|
parameter |
sharePreferences.highFrameRate Boolean
|
parameter |
(Object)
SDK Config
Array
:
[localStream, shareStream]
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.
(Object)
webex instance
(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.
(any)
(any
= {}
)
any
:
leave options
Returns request options for leaving a meeting.
(any)
(any
= {}
)
any
:
request options
Adds the current locus sequence information to a request body
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
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
(String)
the raw error message
Array<object>
:
an array of payload objects
null
:
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String?
= null
)
meeting password
(Object?
= null
)
captcha code and id
(String?
= null
)
(String?
= null
)
(Object?
= {}
)
(Boolean?
= {}
)
meeting Id and whether Call Analyzer events should be sent
Promise
:
returns a meeting info object
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String
= null
)
(String
= null
)
org ID of user's machine
(String
= null
)
(Object
= {}
)
(Object
= {}
)
Promise
:
returns a meeting info object
null
:
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String?
= null
)
meeting password
(Object?
= null
)
captcha code and id
(String?
= null
)
(String?
= null
)
(Object?
= {}
)
(Boolean?
= {}
)
meeting Id and whether Call Analyzer events should be sent
Promise
:
returns a meeting info object
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(DESTINATION_TYPE?
= null
)
to match up with the destination value
(String
= null
)
(String
= null
)
org ID of user's machine
(String
= null
)
(Object
= {}
)
(Object
= {}
)
Promise
:
returns a meeting info object
(String)
ID of the meeting info you wish to retreive
MeetingInfo
:
returns a meeting info instance
(Object)
with format of {type: String, desintation: String}
where type is PERSONAL_ROOM, SIP_URI, CONVERSATION_URL, and destination is userId, sipUri, conversationUrl respectively
type can also be specified as an option and be of the list SIP_URI,MEETING_ID,LOCUS_ID,PERSONAL_ROOM,MEETING_LINK,ONE_ON_ONE,MEDIA_SIP_URI,CONVERSATION_URL,TEMP_SIP_URI
with the desination matching
Promise
:
returns a promise that resolves/rejects the result of the request
(Object)
with format of {type: String, desintation: String}
where type is PERSONAL_ROOM, SIP_URI, CONVERSATION_URL, and destination is userId, sipUri, conversationUrl respectively
type can also be specified as an option and be of the list SIP_URI,MEETING_ID,LOCUS_ID,PERSONAL_ROOM,MEETING_LINK,ONE_ON_ONE,MEDIA_SIP_URI,CONVERSATION_URL,TEMP_SIP_URI
with the desination matching
Promise
:
returns a promise that resolves/rejects the result of the request
Helper function to build up a correct locus url depending on the value passed
Object
:
returns an object with {resource, method}
Helper function to parse the webex site/host from a URI string.
String
:
the site/host part of the URI string (e.g. 'convergedats.webex.com')
Helper function to build up a correct locus url depending on the value passed
Object
:
returns an object with {resource, method}
Helper function to parse the webex site/host from a URI string.
String
:
the site/host part of the URI string (e.g. 'convergedats.webex.com')
(Object)
with format of {userId, passcode, meetingAddress, preferred}
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.
Type:
{reachable: ("true"
| "false"
)?, latencyInMilliseconds: string?, clientMediaIPs: Array<string>?, untested: "true"
?}
Reachability results as an object in the format that backend expects
any
:
reachability results that need to be sent to the backend
Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none of the media clusters where reachable with any of the protocols. This is done irrespective of the config, so for example: if config.meetings.experimental.enableTlsReachability === false, it will return false, because TLS reachability won't be tested, so we can't say for sure that media backend is unreachable over TLS.
boolean
:
Sends a metric with all the statistics about how long reachability took
void
:
A class that handles reachability checks for a single cluster. It emits events from Events enum
Extends EventsScope
(string)
cluster name
(ClusterNode)
information about the media cluster
ClusterReachabilityResult
:
reachability result for this cluster
Aborts the cluster reachability checks by closing the peer connection
void
:
Converts a stun url to a turn url
(string)
url of a stun server
(("tcp"
| "udp"
))
what protocol to use for the turn server
string
:
url of a turn server
Converts a stun url to a turns url
(string)
url of a stun server
string
:
url of a turns server
Make a network request to join a meeting
(Object)
Name | Description |
---|---|
options.sipUri String
|
|
options.deviceUrl String
|
|
options.locusUrl String
|
|
options.resourceId String
|
, |
options.correlationId String
|
|
options.ensureConversation boolean
|
|
options.moderator boolean
|
|
options.pin boolean
|
|
options.moveToResource boolean
|
|
options.roapMessage Object
|
|
options.breakoutsSupported boolean
|
|
options.locale String
|
, |
options.deviceCapabilities Array
|
|
options.liveAnnotationSupported boolean
|
|
options.alias String
|
Promise
:
Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
Promise
:
Prepares request options to to leave a meeting
Object
:
request options
change the content floor grant
(Object)
options for floor grant
Name | Description |
---|---|
options.disposition String
|
floor action (granted/released) |
options.personUrl String
|
personUrl who is requesting floor |
options.deviceUrl String
|
Url of a device |
options.resourceId String
|
Populated if you are paired to a device |
options.uri String
|
floor grant uri |
options.shareInstanceId String
|
id for current share |
Promise
:
Sends a request to the controls endpoint to set the video layout
(Object)
Name | Description |
---|---|
options.locusUrl String
|
|
options.deviceUrl String
|
|
options.layoutType String
|
a layout type that should be available in meeting constants #layout_types |
options.main Object
|
preferred dimensions for the remote main video stream |
options.main.width Number
|
preferred width of main video stream |
options.main.height Number
|
preferred height of main video stream |
options.content Object
|
preferred dimensions for the remote content share stream |
options.content.width Number
|
preferred width of content share stream |
options.content.height Number
|
preferred height of content share stream |
Promise
:
Make a network request to join a meeting
(Object)
Name | Description |
---|---|
options.sipUri String
|
|
options.deviceUrl String
|
|
options.locusUrl String
|
|
options.resourceId String
|
, |
options.correlationId String
|
|
options.ensureConversation boolean
|
|
options.moderator boolean
|
|
options.pin boolean
|
|
options.moveToResource boolean
|
|
options.roapMessage Object
|
|
options.breakoutsSupported boolean
|
|
options.locale String
|
, |
options.deviceCapabilities Array
|
|
options.liveAnnotationSupported boolean
|
|
options.alias String
|
Promise
:
Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
Promise
:
Prepares request options to to leave a meeting
Object
:
request options
change the content floor grant
(Object)
options for floor grant
Name | Description |
---|---|
options.disposition String
|
floor action (granted/released) |
options.personUrl String
|
personUrl who is requesting floor |
options.deviceUrl String
|
Url of a device |
options.resourceId String
|
Populated if you are paired to a device |
options.uri String
|
floor grant uri |
options.shareInstanceId String
|
id for current share |
Promise
:
Sends a request to the controls endpoint to set the video layout
(Object)
Name | Description |
---|---|
options.locusUrl String
|
|
options.deviceUrl String
|
|
options.layoutType String
|
a layout type that should be available in meeting constants #layout_types |
options.main Object
|
preferred dimensions for the remote main video stream |
options.main.width Number
|
preferred width of main video stream |
options.main.height Number
|
preferred height of main video stream |
options.content Object
|
preferred dimensions for the remote content share stream |
options.content.width Number
|
preferred width of content share stream |
options.content.height Number
|
preferred height of content share stream |
Promise
:
Meetings Media Codec Missing Event Emitted when H.264 codec is not found in the browser.
Meetings Media Codec Loaded Event Emitted when H.264 codec has been loaded in the browser.
get device from locus data
Object
:
get self device joined status from locus data
(Object)
current meeting data
(Object)
new locus data
(String)
current device url
Object
:
Extended Error object for general parameter errors
Extends Error
Extends Interceptor
Extended Error object to signify captcha related errors
Extends Error
Extended Error object to signify the intent to join for unclaimed PMR scenarios
Extends Error
Extended Error object to signify password related errors
Extends Error
Extended Error object for general parameter errors
Extends Error
Extended Error object for reclaim host role empty or wrong key
Extends Error
Extended Error object for reclaim host role not supported
Extends Error
Extended Error object for reclaim host role not allowed for other participants
Extends Error
Extended Error object for reclaim host role when user is host already
Extends Error
SharePreferences
Type: Object
JoinOptions
Type: Object
Recording
Type: Object
The meeting instance to execute all state changes on
Specify joining via audio (option: pstn), video, screenshare
(JoinOptions
= {}
)
A configurable options object for joining a meeting
Promise
:
the join response
Roap options
Type: Object
Type: Object
Handles the process of finding out TURN server information from Linus. This is achieved by sending a TURN_DISCOVERY_REQUEST.
(RoapRequest)
Generates TURN_DISCOVERY_REQUEST roap message. When this method returns a roapMessage, it means that a TURN discovery process has started. It needs be ended by calling handleTurnDiscoveryHttpResponse() once you get a response from the backend. If you don't get any response or want to abort, you need to call abort().
Object
:
Aborts current TURN discovery. This method needs to be called if you called generateTurnDiscoveryRequestMessage(), but then never got any response from the server.
void
:
Retrieves TURN server information from the backend by doing a roap message exchange: client server | -----TURN_DISCOVERY_REQUEST-----> | | <----TURN_DISCOVERY_RESPONSE----- | | --------------OK----------------> |
This TURN discovery roap exchange is always done with seq=0. The RoapMediaConnection SDP exchange always starts with seq=1, so it works fine no matter if TURN discovery is done or not.
(Meeting)
(Boolean?)
should be set to true if this is a new
media connection just after a reconnection
(Boolean?)
Promise
:
Sets the remote audio stream
(RemoteStream)
RemoteStream to save
void
:
Sets the remote video stream
(RemoteStream)
RemoteStream to save
void
:
Removes both remote audio and video from class instance
void
:
Unsets all remote streams
void
:
On connection state change.
void
:
Listener for peer connection state change.
void
:
Listener for ICE connection state change.
void
:
Listener for ICE gathering state change.
void
:
Function called when the timeout is reached.
void
:
Initializes the StateMachine for the meeting
(Meeting)
A reference to a meeting instance
StateMachine
:
String
:
Ring stop transition, to end the ring event for the meeting, and transition the state to ANSWERED OR DECLINED, only for outgoing meetings
(Object)
-- FiniteStateMachine automatically passed, not used
(Object)
-- {remoteAnswered: {Boolean}, remoteDeclined: {Boolean}}
Boolean
:
Ring transition, to cause the ring event for the meeting, and transition the state to RINGING, for both incoming, and outgoing meetings
(Object)
-- FiniteStateMachine automatically passed, not used
(String)
-- incoming call === INCOMING / or other meetings have a ring type of JOIN
Boolean
:
handle the entry to error state
Boolean
:
After ANY transition occurs, we want to know what state the meeting moved to for debugging
(Object)
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
(String)
audio or video
(Object)
the meeting object (used for reading current remote mute status)
(boolean)
whether the client audio/video is enabled at all
This method should be called when the local stream mute state is changed
void
:
Applies the current mute state to the local stream (by enabling or disabling it accordingly)
(Object?)
the meeting object
(ServerMuteReason)
reason why we're applying our client state to the local stream
void
:
This method should be called whenever the server remote mute state is changed
(Meeting)
(Boolean?)
true if user is remotely muted, false otherwise
(Boolean?)
indicates if user is allowed to unmute self (false when "hard mute" feature is used)
undefined
:
This method needs to be called whenever the local audio/video stream has changed. It reapplies the remote mute state onto the new stream and also reads the current local mute state from the stream and updates the internal state machine and sends any required requests to the server.
(Object)
the meeting object
void
:
Stores the delta values for a changed participant.
Type: Object
handles when the locus.host is updated
(Object)
the locus.host property
undefined
:
handles when the locus.mediaShares is updated
(Object)
the locus.mediaShares property
undefined
:
handles when the locus.self is updated
undefined
:
parses the relevant values for self: muted, guest, moderator, mediaStatus, state, joinedWith, pstnDevices, creator, id
undefined
:
Checks if user has joined the meeting
(Object)
boolean
:
isJoined
Validate if the Meeting Layout Controls Layout has changed.
boolean
:
If the Meeting Layout Controls Layout has changed.
get the id from the self object
(Object)
String
:
get the "remote video mute" property from the self object
(Object)
Boolean
:
get the "remote mute" property from the self object
(Object)
Boolean
:
Boolean
:
(Object)
Boolean
:
(Object)
Boolean
:
(Object)
Boolean
:
determine whether the roles of self is changed or not
Boolean
:
Boolean
:
Boolean
:
extract the sipUrl from the partner
Object
:
parse the relevant host values that we care about: id
(Object)
Object
:
parsed host or null if host was undefined
get the previous and current host values parsed, as well as the boolean updates
Object
:
previous: {Object} old host, current: {Object} new host, updates: {isNewHost: {boolean}} boolean update values
determine by id if 2 hosts are different
Boolean
:
Extract the id from the host object
(Object)
String
:
Controls
Type: Object
parse the relevant host values that we care about: id
(LocusControls)
Object
:
parsedObject - parsed host or null if host was undefined
String
:
parsedObject.recordingId
parses and returns previous state vs current state and triggers the changes.
(LocusControls)
previous state
(LocusControls)
current state
Object
:
combination of state plus the changes
Extract the id from the record controls object
(LocusControls)
(String | null)
:
check whether to replace the meeting's members or not. For case joined breakout session, need replace meeting's members
(LocusControls)
(LocusControls)
Boolean
:
determine the switch status between breakout session and main session.
(LocusControls)
(LocusControls)
Object
:
Parse the relevant values that we care about
(Object)
raw embedded app object
Object
:
parsedObject - parsed embedded app object
Determines if two embedded apps arrays are similar. NOTE: This is a simple test for performance reasons.
boolean
:
true if the arrays are different
Parse the array of embedded apps
(array)
array
:
result - new array of parsed embedded app objects
parses the relevant values for mediaShares: contentId, disposition
(Object)
undefined
:
get the previous and current mediaShares values parsed, as well as the boolean updates
Object
:
previous: {Object} old share, current: {Object} new share,
get the content floor disposition (released, granted)
(Object)
Boolean
:
disposition
get the whiteboard floor disposition (released, granted)
(Object)
Boolean
:
disposition
extract the content property from media shares
(Object)
Object
:
extract the whiteboard property from media shares
(Object)
Object
:
extract the media stream floor property from content object
(Object)
Object
:
extract the content's floor from media shares
(Object)
Object
:
extract the whiteboard's floor from media shares
(Object)
Object
:
get who is sharing from media shares (content)
(Object)
Object
:
get live annotation is sharing from media shares (content)
(Object)
Object
:
get live resourceType is sharing from media shares (content)
(Object)
Object
:
get url is sharing from media shares (content)
(Object)
Object
:
get shareInstanceId is sharing from media shares (content)
(Object)
Object
:
get deviceUrl that is requesting the floor for media shares (content)
(Object)
Object
:
get who is sharing from media shares (whiteboard)
(Object)
Object
:
get the which whiteboard is being shared via resource url
(Object)
Object
:
Compares two loci to determine which one contains the most recent state
(Types~Locus)
(Types~Locus)
string
:
loci comparison state
Type: object
Simple queue in which the elements are always sorted
(Function)
comparison function used for sorting the elements of the queue
Used to indicate that the reconnect logic needs to be retried.
Extends Error
Used to indicate that the meeting needs to be rejoined, not just media reconnected
Extends Error
void
:
Initiates a media reconnect for the active meeting
(Object
= {}
)
Name | Description |
---|---|
reconnectOptions.networkDisconnect boolean
(default false )
|
indicates if a network disconnect event happened |
reconnectOptions.networkRetry boolean
(default false )
|
indicates if we are retrying the reconnect |
(Function?
= undefined
)
callback that gets called when reconnection is started successfully
Promise
:
Error object for cases when new reconnection cannot be started
Extends ReconnectionError
Extended Error object to signify the intent to join for unclaimed PMR scenarios
Extends Error
Members Update Event Emitted when something in the roster list needs to be updated
Members Content Update Event Emitted when who is sharing changes
Members Host Update Event Emitted when who is the host changes
Members Self Update Event Emitted when who is the self changes
Is this member associated to another user by way of pairing (typical of devices)
Type: String
Type: IExternalRoles
Type: IMediaStatus
{audio: MediaStatus.RECVONLY, video: MediaStatus.SENDRECV}
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
[ServerRoleShape]
:
(Object)
the locus participant
(ServerRoles)
the search role
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
IExternalRoles
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
checks to see if the participant id is the same as the passed id there are multiple ids that can be used
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
Boolean
:
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
Boolean
:
utility method for audio/video muted status
(Boolean | undefined)
:
utility method for getting the recording member for later comparison
(Object)
(String | null)
:
(Object)
the locus participant
Boolean
:
(Object)
the locus participant
String
:
(Object)
the locus participant
String
:
extracts the media status from nested participant object
(Object)
the locus participant
Object
:
(Object)
the locus participant
String
:
Sends a request to raise or lower a member's hand
Promise
:
Object
:
the format object
Object
:
the format object
(Object)
with {invitee: {emailAddress, email, phoneNumber}, alertIfActive}
Object
:
with {invitees: [{address}], alertIfActive}
(Object)
with {memberIds, authorizingLocusUrl}
Object
:
admit with {memberIds}
(Object)
with {memberIds, locusUrl, sessionLocusUrls}
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
(Object)
with {invitee {emailAddress, email, phoneNumber}, locusUrl, alertIfActive}
Object
:
the request parameters (method, uri, body) needed to make a addMember request
RoleAssignmentOptions
:
(String)
id of the participant who is receiving request
(String)
id of the participant who is sending request (optional)
(String)
alias name
(String)
url
Object
:
consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
(ServerRoleShape)
ServerRoleShape
:
the role shape to be added to the body
(RoleAssignmentOptions)
RoleAssignmentRequest
:
the request parameters (method, uri, body) needed to make a addMember request
(Object)
with format of {locusUrl: string, requestingParticipantId: string}
Object
:
request parameters (method, uri, body) needed to make a editDisplayName request
The Controls Options Manager utilities
Validate if disabling mute on entry can be set.
boolean
:
True if the action is allowed.
Validate an array of hints are allowed based on a full collection of hints.
boolean
:
True if all of the actions are allowed.
Validate that the self policy object contains the required policies.
boolean
:
True if all of the actions are allowed.
Validate if an audio-scoped control is allowed to be sent to the service.
(ControlConfig<AudioProperties>)
Audio control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if an reactions-scoped control is allowed to be sent to the service.
(ControlConfig<ReactionsProperties>)
Reaction control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if an share-control-scoped control is allowed to be sent to the service.
boolean
:
True if all of the actions are allowed.
Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.
(ControlConfig<ViewTheParticipantListProperties>)
View Participants List control config to validate.
boolean
:
True if all of the actions are allowed.
Validate if a video-scoped control is allowed to be sent to the service.
(ControlConfig<VideoProperties>)
Video control config to validate.
boolean
:
True if all of the actions are allowed.
A list of additional properties that apply to various specific settings.
The scope of the control within this object.
Type: Control
The properties to assign to this control.
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.
(CreateSlotCallback)
(FindMemberIdCallback)
(Meeting)
Creates a new receive slot or returns one from the existing pool of free slots
(MediaType)
Promise<ReceiveSlot>
:
Releases the slot back to the pool so it can be re-used by others in the future
(ReceiveSlot)
Resets the slot manager - this method should be called when the media connection is torn down
Tries to find the member id on all allocated receive slots This function should be called when new members are added to the meeting.
Find a receive slot by a ssrc.
(number)
The ssrc of the receive slot to find.
(ReceiveSlot | undefined)
:
The receive slot with this ssrc, undefined if not found.
This method is used to create a sendSlot for the given mediaType and returns the created sendSlot
(MultistreamRoapMediaConnection)
MultistreamRoapMediaConnection for which a sendSlot needs to be created
(MediaType)
MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(boolean
= true
)
This is optional boolean to set the active state of the sendSlot. Default is true
SendSlot
:
slot The created sendSlot
This method is used to retrieve the sendSlot for the given mediaType
(MediaType)
of which the slot needs to be retrieved
SendSlot
:
Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.
(MediaType)
MediaType of the sendSlot to which the audio stream needs to be send to the media group
([])
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.
void
:
This method publishes the given stream to the sendSlot for the given mediaType
(MediaType)
MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(LocalStream)
LocalStream to be published
Promise<void>
:
This method unpublishes the stream from the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
Promise<void>
:
This method is used to set the active state of the sendSlot for the given mediaType
(MediaType)
The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(boolean
= true
)
The boolean to set the active state of the sendSlot. Default is true
void
:
This method is used to set the codec parameters for the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
(Object)
Promise<void>
:
This method is used to delete the codec parameters for the sendSlot of the given mediaType
(MediaType)
MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
Promise<void>
:
This method is used to reset the SendSlotsManager by deleting all the sendSlots
undefined
:
Default configuration:
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:
Extends EventsScope
(ReceiveSlotManager)
({audio: MediaRequestManager, video: mediaRequestManagers})
(Configuration
= DefaultConfiguration
)
Configuration describing what video layouts to use during the meeting
Releases all the used resources (like allocated receive slots). This function needs to be called when we leave the meeting, etc.
Returns the currently selected layout id
LayoutId
:
Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup. For each entry in the remoteMediaCsis array:
(Array<{remoteMedia: RemoteMedia, csi: number?}>)
Logs all current receive slots
Sets a new CSI on a given remote media object
(RemoteMedia)
remote Media object to modify
(CSI)
new CSI value, can be null if we want to stop receiving media
Adds a new member video pane to the currently selected layout.
Changes to the layout are lost after a layout change.
(MemberVideoPane)
Promise<RemoteMedia>
:
Pins an active speaker remote media object to the given CSI value. From that moment onwards the remote media will only play audio/video from that specific CSI until unpinActiveSpeakerVideoPane() is called or current layout is changed.
(RemoteMedia)
remote media object reference
(CSI)
CSI value to pin to, if undefined, then current CSI value is used
void
Unpins a remote media object from the fixed CSI value it was pinned to.
(RemoteMedia)
remote media object reference
Returns true if a given remote media object belongs to an active speaker group and has been pinned. Throws an error if the remote media object doesn't belong to any active speaker remote media group.
(RemoteMedia)
remote media object
boolean
:
Gets the array of remote media elements from the group
(string
= 'all'
)
'all' (default) returns both pinned and unpinned
Array<RemoteMedia>
:
Sets CSIs for multiple RemoteMedia instances belonging to this RemoteMediaGroup. For each entry in the remoteMediaCsis array:
(Array<{remoteMedia: RemoteMedia, csi: number?}>)
(any
= true
)
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.
(RemoteMedia)
(CSI?)
void
Unpins a remote media instance, so that it will again provide media from active speakers
(RemoteMedia)
setPreferLiveVideo - sets preferLiveVideo to true/false
setNamedMediaGroup - sets named media group type and value
(NamedMediaGroup)
(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.
(boolean
= true
)
whether to commit the cancellation of media requests
Checks if a given RemoteMedia instance belongs to this group.
(RemoteMedia)
RemoteMedia instance to check
(("all"
| "pinned"
| "unpinned"
)
= 'all'
)
controls which remote media from the group to check
boolean
:
true if remote media is found
Returns true if the user is in the main session
boolean
:
Returns true if the breakout status is active
boolean
:
Returns the active group id
boolean
:
Returns the breakout status
boolean
:
Returns should query preAssignments or not
boolean
:
initialize for the breakouts
void
:
Calls this to clean up listeners
void
:
The initial roster lists need to be queried because you don't get a breakout.roster event when you join the meeting
void
:
Sets up listener for currentBreakoutSession sessionType changed
void
:
Sets up listener for broadcast messages sent to the breakout session
void
:
Sets up a listener for roster messags from mecury
void
:
Sets up a listener for ask help notify from mecury
void
:
clear breakouts collection
void
:
enable and edit lock breakout
void
:
send breakout edit lock
void
:
keep edit lock alive
void
:
unlock edit breakout
void
:
query preAssignments
void
:
If the breakout has no name, assume it is the main session
boolean
:
initializer for the Breakout class
void
:
inits the members object
void
:
Broadcast message to all breakout session's participants
Name | Description |
---|---|
$0.url any
|
|
$0.message any
|
|
$0.options any
|
|
$0.groupId any
|
|
$0.sessionId any
|
(String)
(String)
(Object)
(string)
(string)
Promise
:
Deals with all kinds of errors of breakout service
(object)
// one of the breakout service error
(string)
// position of the error occur
object
:
boolean
:
Extended Error object to signify breakout related errors
Extends Error
Returns should query support languages or not
boolean
:
initialize for interpretation
void
:
Calls this to clean up listeners
void
:
Update whether the meeting support SI feature or not from meeting info
void
:
Sets up a listener for handoff requests from mercury
void
:
Annotation to handle LLM and Mercury message and locus API
Extends WebexPlugin
(...any)
Sends stroke data to presenter
(StrokeData)
void
:
(String)
Member
:
IInMeetingActions Type for In-Meeting Actions
(Partial<IInMeetingActions>)
(Object)
void
:
(string)
void
:
(Array)
void
:
(Object)
void
:
(string)
void
:
(string)
void
:
string
:
string
:
string
:
string
:
Array
:
Promise
:
Promise
:
Promise
:
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
(MeetingRequest)
Class representing a single /media request being sent to Locus
(Request)
(Defer)
Returns the list of pending promises associated with this request
Returns true if the request is triggering confluence creation in the server
(Request)
boolean
This class manages all /media API requests to Locus. Every call to that Locus API has to go through this class.
Extends WebexPlugin
(Config)
(any)
Current overall connection state
Type: ConnectionState
Rtc Metrics
Array of MetricData items to be sent to the metrics service.
Check to see if the metrics queue has any items.
void
:
Forces sending metrics when we get the next stats-report
This is useful for cases when something important happens that affects the media connection, for example when we move from lobby into the meeting.
void
:
Clear the metrics interval.
void
:
Extended Error object for general parameter errors
Extends Error
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
(number)
: 30105
(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.'
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends Error
(number)
Error code
(...Array<any>)
(string?)
Error message
(string?)
Name of the script file where error was generated
(number?)
Line number of the script file where error was generated
(number)
: Error code
Extended Error object to signify a join meeting error
Extends Error
@description Layout type for remote video participants. Allowed values are: Single, Equal, ActivePresence, Prominent, OnePlusN
Type: array
the values for IP_VERSION are fixed and defined in Orpheus API
Type for an StrokeData Object
Type: {deviceId: string, toUserId: string, requesterId: string, content: string, shareInstanceId: string, encryptionKeyUrl: string, version: string}
Type for an annotation Object include annotation version and privilege
Type: {version: string, policy: ANNOTATION_POLICY}
(string)
(ANNOTATION_POLICY)
Error to indicate that wbxappapi requires a password
Extends Error
Error generating a adhoc space meeting
Extends Error
Error preventing join because of a meeting policy
Extends Error
Error to indicate that preferred webex site not present to start adhoc meeting
Extends Error
Raises a MeetingInfoV2PolicyError for policy error codes
(any)
the error from the request
void
:
Metrics handles all the call metrics events
Uploads given metric to the Metrics service as an Behavioral metric. Metadata about the environment such as browser, OS, SDK and their versions are automatically added when the metric is sent.
The Metrics service will send an Behavioral metric to InfluxDB for aggregation. See https://confluence-eng-gpk2.cisco.com/conf/display/WBXT/Getting+started+with+Metrics+Service.
(string)
Name of the metric (measurement) to send
(Object
= {}
)
Key-valye pairs of data or values about this metric
(Object
= {}
)
Key-value pairs of metric metadata
void
:
Flattens an object into one that has no nested properties. Each level of nesting is represented by "_" in the flattened object property names. This function is needed, because Amplitude doesn't allow passing nested objects as metricFields. Use this function for metricFields before calling sendBehavioralMetric() if you want to send nested objects in your metrics.
If the function is called with a literal, it returns an object with a single property "value" and the literal value in it.
(any
= {}
)
object you want to flatten
(string
= ''
)
string prefix prepended to any property names in flatten object
Object
:
Converts pane size into h264 maxFs
(PaneSize)
number
:
Class representing a remote audio/video stream.
Internally it is associated with a specific receive slot and a media request for it.
Extends EventsScope
Supply the width and height of the video element to restrict the requested resolution to this size
(any)
width of the video element
(any)
height of the video element
Sends a new media request. This method can only be used for receiver-selected policy, because only in that policy we have a 1-1 relationship between RemoteMedia and MediaRequest and the request id is then stored in this RemoteMedia instance. For active-speaker policy, the same request is shared among many RemoteMedia instances, so it's managed through RemoteMediaGroup
(CSI)
(boolean)
Getter for mediaType
Type: MediaType
MediaType
Getter for memberId
Getter for csi
Getter for source state
Type: StreamState
StreamState
Getter for remote media stream
ReceiveSlot
:
Events plugin-meetings local Used to emit events internally between modules specific to an object
Extends ChildEmitter
Returns true if two stream requests are the same, false otherwise.
(StreamRequest)
Stream request A for comparison.
(StreamRequest)
Stream request B for comparison.
boolean
:
Whether they are equal.
Clears the previous stream requests.
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
Extends EventsScope
(MediaType)
(ReceiveSlot)
(FindMemberIdCallback)
callback for finding memberId for given CSI
Getter for memberId
Getter for csi
Set the max frame size for this slot
(any)
frame size
Getter for sourceState
Tries to find the member id for this receive slot if it hasn't got one
The MediaStream object associated with this slot.
Type: MediaStream
MediaStream
:
The MediaStreamTrack.
The underlying WCME receive slot
Type: WcmeReceiveSlot
WcmeReceiveSlot
Type: IPresence
Extends WebexPlugin
Gets the current presence status of a given person id
(string)
Promise<PresenceStatusObject>
:
resolves with status object of person
Gets the current presence statuses of an array of people ids
(Array)
Promise<PresenceStatusesObject>
:
resolves with an object with key of
statusList
array
The status object
Type: Object
(string)
: : Public resource identifier for presence
(string)
: : User ID for the user the returned composed presence represents
(string)
: : Current composed presence state
(string)
: : DateTime in RFC3339 format that the current status began
(string)
: : DateTime in RFC3339 format that the service last saw activity from the user.
(string)
: : DEPRECATED - DateTime in RFC3339 format that represents when the current
status will expire. Will not exist if expiresTTL is -1.
(Number)
: : TTL in seconds until the status will expire. If TTL is -1 the current
status has no known expiration.
(string)
: : DateTime in RFC3339 format that the current status will expire. Missing
field means no known expiration.
(Object)
: : Used for packet ordering and tracking.
(Boolean)
: : Indicates if notification suppression is recommended for this status.
(string)
: : Resource Identifier of the last device to post presence activity for
this user.
Type: Object
(Array<PresenceStatusObject>)
Presence Worker Manages fetches and subscriptions for presence
Helper method to build a roomInfo object from a conversation object
(Object)
sdk object
(Conversation~ConversationObject)
Promise<RoomInfoObject>
:
Helper method to build a list of roomInfo object from conversation list
(Object)
sdk object
(Conversation~ConversationObjectList)
Promise<RoomInfoList>
: