Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagejs
contact.on("requestVideoUpgrade", 
  function (event) {
    // the Agent can accept/refuse the video media escalation
  }
);

Response API (available on both agent

...

/customer engagement)

Code Block
languagejs
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
languagejs
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
languagejs
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:

  • onJoined: a new participant joined the video room.

  • onLeft: a participant left the video room.

  • onDynamicChanged: the order of participants has changed, based on their importance according to active speech detection. The “participant” parameter will contains an ordered array of participants according to rank.

  • onLoudestChanged: a new participant becomes the loudest, based on active speech detection.

participant

Object

The object contains the participant information.