...
CTLive offers a built-in Vidyo integration by extending the contact chat object adding method and properties to control the media audio/video escalation.
...
divID: Element div/panel ID where the composited video will be rendered
useAudio: flag that indicates whether to perform a media escalation on the current chat using the audio channel
useVideo: flag that indicates whether to perform a media escalation on the current chat using the video channel
Request Event notification (available on both agent
...
/customer engagement)
Register a callback on contact object for the “requestVideoUpgrade” event.
Code Block | ||
---|---|---|
| ||
contact.on("requestVideoUpgrade", function (event) { // the Agent can accept/refuse the video media escalation } ); |
Response API (available on both agent
...
/customer engagement)
Code Block | ||
---|---|---|
| ||
contact.responseVideoUpgrade(Boolean <true/false>, String <divID>); // Example: Agent accept the media escalation contact.responseVideoUpgrade(true, "videoPanel"); // Example: agent rejected the media escalation contact.responseVideoUpgrade(false, "videoPanel"); |
Response Event notification (available on both agent/customer
...
engagement)
Code Block | ||
---|---|---|
| ||
contact.on("responseVideoUpgrade", function (event) { console.log("On [responseVideoUpgrade] event", event.response); // no action is required by the integration. // the audio / video connection will be automatically engaged // upon receipt of the positive response. } ) |
...
Code Block | ||
---|---|---|
| ||
contact.bindVideoParticipantEvent(
function(event, eventName, participant) {
console.log("[CTLIVE AGENT SDK] PARTICIPANT Event [" + eventName + "]");
}
); |
Name | Type | Description |
---|---|---|
event | object | jQuery standard event notification object |
eventName | String | Participant event name. It can be one of the following values:
|
participant | Object | The object contains the participant information. |