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)
gets the reachability instance for Meetings
Reachability
:
gets the personal meeting room instance, for saved PMR values for this user
PersonalMeetingRoom
:
Create a meeting.
(string)
sipURL, spaceId, phonenumber, or locus object}
(string?
= null
)
the optional specified type, such as locusId
(Boolean
= false
)
whether a random delay should be added to fetching meeting info
Promise<Meeting>
:
A new Meeting.
Get all meetings.
Object
:
All currently active meetings.
Get all scheduled meetings.
Object
:
All scheduled meetings.
Checks if the machine has at least one audio or video device
Object
:
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
Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>
:
Shorthand function to join AND set up media
(Object
= {}as any
)
options to join with media
Name | Description |
---|---|
options.joinOptions JoinOptions?
|
see #join() |
options.mediaSettings MediaDirection
|
see #addMedia() |
options.audioVideoOptions AudioVideo?
|
see #getMediaStreams() |
Promise
:
-- {join: see join(), media: see addMedia(), local: see getMediaStreams()}
joinWithMedia({
joinOptions: {resourceId: 'resourceId' },
mediaSettings: {
sendAudio: true,
sendVideo: true,
sendShare: false,
receiveVideo:true,
receiveAudio: true,
receiveShare: true
}
audioVideoOptions: {
audio: 'audioDeviceId',
video: 'videoDeviceId'
}})
Get local media streams based on options passed
(MediaDirection)
A configurable options object for joining a meeting
(AudioVideo?
= VIDEO_RESOLUTIONS[this.mediaProperties.localQualityLevel]
)
audio/video object to set audioinput and videoinput devices, see #Media.getUserMedia
(SharePreferences?)
audio/video object to set audioinput and videoinput devices, see #Media.getUserMedia
Promise
:
see #Media.getUserMedia
Specify joining via audio (option: pstn), video, screenshare
(Object
= {}
)
A configurable options object for joining a meeting
Name | Description |
---|---|
options.resourceId Object
|
pass the deviceId |
options.mediaSettings MediaDirection
|
pass media options |
options.localStream MediaStream
|
|
options.localShare MediaStream
|
Promise
:
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
:
A confluence of updateAudio, updateVideo, and updateShare this function re-establishes all of the media streams with new options
(Object
= {}as any
)
Name | Description |
---|---|
options.localStream MediaStream
|
|
options.localShare MediaStream
|
|
options.mediaSettings MediaDirection
|
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
:
Type: MeetingStateMachine
Passing only info as we send basic info for meeting added event
Type: MediaProperties
Type: InMeetingActions
This is deprecated, please use shareStatus instead.
Type: Boolean
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
stop recieving Transcription by closing the web socket connection properly
void
:
(Object
= {}as any
)
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 |
Promise
:
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 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
Meeting network quality event Emitted on each interval of retrieving stats Analyzer data
Type: Object
Closes the local stream from the class and emits an event to the developer
undefined
:
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
:
Metrics handles all the call metrics events
Initializes the Metrics singleton with a meeting Collection.
void
:
Docs for Call analyzer metrics https://sqbu-github.cisco.com/WebExSquared/call-analyzer/wiki https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/master/diagnostic-events.raml
(any)
(any)
(any)
This function Parses a Locus error and returns a diagnostic event payload. It should keep updating from: https://sqbu-github.cisco.com/WebExSquared/spark-client-framework/blob/master/spark-client-framework/Adapters/TelephonyAdapter/TelephonyAdapter.cpp#L920
(Object)
the error Object from Locus response
(boolean)
true if a toast is shown to user
{showToUser: boolean, category: string, errorDescription: string, errorCode: number, errorData: any, fatal: boolean, name: string}
:
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
:
MediaDirection
Type: Object
MediaDirection
Type: Object
SendOptions
Type: Object
(Object)
SendOptions
Type: Object
Type: any
(RTCPeerConnection)
Promise
:
make a browser call to get the media
(SendOptions)
(Object)
SDK Configuration for meetings plugin
Promise
:
creates peerconnection and attaches streams
(MediaDirection)
Array
:
[peerConnection, ]
updates all the media streams and creates a new media offer
(MediaDirection)
Promise
:
creates a new offer
(Object)
Name | Description |
---|---|
meetingProperties.meetingId string
|
|
meetingProperties.remoteQualityLevel string
|
LOW|MEDIUM|HIGH |
meetingProperties.enableRtx any
|
|
meetingProperties.enableExtmap any
|
(RTCPeerConnection)
(RTCRtpTransceiver)
(Object)
see #Media.setTrackOnTransceiver
Promise
:
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
(MediaTrack)
A media 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]
Type: any
makes sure the screen pc sdp has content:slides for server
(RTCPeerConnection)
RTCPeerConnection
:
handles ice trickling and establishes ICE connection onto peer connection object
Promise.RTCPeerConnection
:
Create offer with a valid parameter
(Object)
RTCPeerConnection
:
RTCPeerConnection
:
peerConnection
munges the bandwidth limit into the sdp
String
:
needed for calliope max-fs
String
:
checks that sdp has h264 codec in it
(String)
boolean
:
validates the sdp, checks port, candidates, and ice info
(String)
String
:
munges the bandwidth into the sdp
(String)
String
:
Convert C line to IPv4
(string)
string
:
estimate profile levels for max-fs & max-mbps values
string
:
Extended Error object to signify the intent to join for unclaimed PMR scenarios
Extends Error
Extended Error object for media errors
Extends Error
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
Extends WebexMeetingsError
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 the intent to join for unclaimed PMR scenarios
Extends Error
Extended Error object to signify a join meeting error
Extends Error
Extended Error object for general parameter errors
Extends Error
null
:
Fetches meeting info from the server
(String)
one of many different types of destinations to look up info for
(String?
= null
)
to match up with the destination value
(String
= null
)
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
(String?
= null
)
to match up with the destination value
(String
= null
)
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 check if a string matches a known meeting link pattern
(String)
string to parse and see if it matches a meeting link
Boolean
:
Helper function to check if a string matches a known meeting link pattern
(String)
string to parse and see if it matches a meeting link
Boolean
:
Helper function to build up a correct locus url depending on the value passed
(String)
One of [SIP_URI, PERSONAL_ROOM, MEETING_ID, CONVERSATION_URL, LOCUS_ID, MEETING_LINK]
(Object)
?? value.value
Object
:
returns an object with {resource, method}
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 return the direct URI for fetching meeting info (to avoid a redirect).
String
:
returns a URI string or null of there is no direct URI
Error to indicate that wbxappapi requires a password
Extends Error
Error generating a adhoc space meeting
Extends Error
Error to indicate that preferred webex site not present to start adhoc meeting
Extends Error
AudioVideo
Type: Object
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
Stats Analyzer class that will emit events based on detected quality
Extends EventsScope
captures MQA data from peerconnection
void
:
Cleans up the analyzer when done
void
:
Values for some browsers specifically Safari will be undefined we explicitly set to null https://bugs.webkit.org/show_bug.cgi?id=206645 https://bugs.webkit.org/show_bug.cgi?id=212668
NetworkQualityMonitor class that will emit events based on detected quality
Extends EventsScope
emits NETWORK_QUALITY event on meeting with payload of media type and uplinkNetworkQuality score
void
:
invokes emitNetworkQuality method resets values back to default
void
:
determines if packetLoss ratio is over threshold set in config sets networkQualityScore to 0 if over threshold
boolean
:
determines if round trip time value is over threshold set in config sets networkQualityScore to 0 if over threshold
boolean
:
determines if jitter value is over threshold in config sets networkQualityScore to 0 if over threshold
boolean
:
returns null if val is specifically undefined
(number | null)
:
Events plugin-meetings local Used to emit events internally between modules specific to an object
Extends ChildEmitter
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)
Retrieves TURN server information from the backend by doing a roap message exchange: client server | -----TURN_DISCOVERY_REQUEST-----> | | <----TURN_DISCOVERY_RESPONSE----- | | --------------OK----------------> |
(Meeting)
(Boolean)
should be set to true if this is a new
media connection just after a reconnection
Promise
:
Sets the remote audio track
(MediaTrack)
MediaTrack to save
void
:
Sets the remote video track