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.
Code Block | ||
---|---|---|
| ||
contact.bindVideoMicrophoneEvent( function (eventObjevent, 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
: 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.
Code Block | ||
---|---|---|
| ||
contact.bindVideoSpeakerEvent(
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.
Code Block | ||
---|---|---|
| ||
contact.bindVideoWebcamEvent( function (event, eventName, microphoneObjwebcam, 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