Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

The CTLive Agent SDK allows the user to manage their devices to directly select the camera, microphone, or speaker that want to use. To get notified which devices are available and select a device by name, you can use the following APIs.

Microphone management

The contact.bindVideoMicrophoneEvent bind a custom javascript function to be notified of all events occurring on the audio capture devices.

contact.bindVideoMicrophoneEvent(
  function (event, eventName, microphone, state) {
    // Add your integration code
  }
);

The following parameters are passed in the custom callback:

Name

Type

Description

event

Object

jQuery standard event notification object

eventName

String

Microphone event name. It can be one of the following values:

  • onAdded: a new audio capture device is available. The microphone parameter will be set with an object that refers to the new device.

  • onRemoved: the capture device referenced by the microphone object has been removed from the system and is no longer available

  • onSelected: the capture device referenced by the microphone object has been selected by user.

  • onStateUpdated: the capture device state has been updated. The “state” parameter will be set to the new state.

microphone

Object

The Object that refers to new microphone audio device. The object has the following properties:

  • id: internal identification string

  • name: the name of the device registered on the operating system

  • objId: Vidyo unique identification

  • objType: Vidyo device type

state

String

The device new state.

contact.unbindVideoMicrophoneEvent : will unbind the custom callback.

contact.getVideoMicrophoneList : returns an array of capture device objects currently available on the system.

contact.setVideoMicrophone (String objId) : select as current microphone the audio device with the Vidyo objId specified.

contact.videoMute : Mute the current microphone device.

contact.videoUnmute : Resume the current microphone device.

Speakers management

The contact.bindVideoSpeakerEvent bind a custom javascript function to be notified of all events occurring on the audio playback devices.

contact.bindVideoWebcamEvent(
  function (event, eventName, speaker, state) {
    // Add your integration code
  }
);

Name

Type

Description

event

Object

jQuery standard event notification object

eventName

String

Speaker event name. It can be one of the following values:

  • onAdded: a new video playback device is available. The speaker parameter will be set with an object that refers to the new device.

  • onRemoved: the video playback device referenced by the speaker object has been removed from the system and is no longer available

  • onSelected: the video playback device referenced by the speaker object has been selected by user.

  • onStateUpdated: the playback device state has been updated. The “state” parameter will be set to the new state.

speaker

Object

The Object that refers to new speaker audio device. The object has the following properties:

  • id: internal identification string

  • name: the name of the device registered on the operating system

  • objId: Vidyo unique identification

  • objType: Vidyo device type

state

String

The device new state.

contact.unbindVideoSpeakerEvent : will unbind the custom callback.

contact.getVideoSpeakerList : returns an array of playback device objects currently available on the system.

contact.setVideoSpeaker (String objId) : select as current speaker the audio device with the Vidyo objId specified.

Webcam management

The contact.bindVideoWebcamEvent bind a custom javascript function to be notified of all events occurring on the video capture devices.

contact.bindVideoWebcamEvent(
  function (event, eventName, webcam, state) {
    // Add your integration code
  }
);

Name

Type

Description

event

Object

jQuery standard event notification object

eventName

String

Webcam event name. It can be one of the following values:

  • onAdded: a new video capture device is available. The webcam parameter will be set with an object that refers to the new device.

  • onRemoved: the video capture device referenced by the webcam object has been removed from the system and is no longer available

  • onSelected: the video capture device referenced by the webcam object has been selected by user.

  • onStateUpdated: the capture device state has been updated. The “state” parameter will be set to the new state.

webcam

Object

The Object that refers to new microphone audio device. The object has the following properties:

  • id: internal identification string

  • name: the name of the device registered on the operating system

  • objId: Vidyo unique identification

  • objType: Vidyo device type

state

String

The device new state.

contact.unbindVideoWebcamEvent : will unbind the custom callback.

contact.getVideoWebcamList : returns an array of capture video device objects currently available on the system.

contact.setVideoWebcam (String objId) : select as current webcam the capture video device with the Vidyo objId specified.

contact.videoCameraOff : stops capturing video from the current webcam.

contact.videoCameraOn : resumes video capture from the current webcam

  • No labels