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:
|
microphone | Object | The Object that refers to new microphone audio device. The object has the following properties:
|
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
: the current microphone has been muted.
contact.videoUnmute
: the current audio capture device has been resumed.
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:
|
speaker | Object | The Object that refers to new speaker audio device. The object has the following properties:
|
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:
|
webcam | Object | The Object that refers to new microphone audio device. The object has the following properties:
|
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