CTLive Vidyo Integration
Vidyo.io is a platform as a service (PaaS) that enables developers to provide high-quality, real-time video communication capabilities. The service includes the VidyoClient SDK, which provides the APIs for integrating such communication capabilities into a variety of applications and workflows.
CTLive offers a built-in Vidyo integration by extending the contact chat object adding methods and properties to control the media audio/video escalation.
Media escalation feature
CTLive offers a basic media escalation feature. A customer with an ongoing chat can request an engagement of the audio/video channel by creating a video conference. The CTLive SDK library offers a notification and response API allowing you to perform a request-response-engagement flow on the video channel.
Request API (on customer side)
contact.requestVideoUpgrade(String <divID>, Boolean <useAudio>, Boolean <useVideo>)
// Example:
contact.requestVideoUpgrade("videoPanel", true, true);
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.
contact.on("requestVideoUpgrade",
function (event) {
// the Agent can accept/refuse the video media escalation
}
);
Response API (available on both agent/customer engagement)
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)
Participants Events Callback
A custom integration can bind a callback to receive notification about the participants members of the video engagement session.
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. |
Disconnecting Video session
Use the contact.videoDisconnecAndDestruct
method to disconnect the participant from the video room.
To engage a new video session, a new media escalation must be requested.