setSpeakIndex (Setting the Speaker)
Interface Description
This interface is invoked to set the speaker for calls.
Notes
- The WebSocket connection with the OpenEye is set up.
- Generally, the device serial number is obtained using getMediaDevice (getMediaDevices (Obtaining the Device List)) after the system is initialized.
Method Definition
OpenEyeCall.prototype.setSpeakIndex = function(idx, callbacks)
Parameter Description
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
idx |
Number |
Mandatory |
Serial number of the speaker. |
callbacks |
Optional |
Callback method. |
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
response |
function |
Mandatory |
For details about the input parameters of the callback method, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
description |
String |
Description of the current request. |
result |
Number |
Query result. The value 0 indicates success and other values indicate failure. |
rsp |
Number |
Internal message ID. |
The following is an example of input parameters of the callback method:
{ "description" : "tsdk_set_speak_index", "result" : 0, "rsp" : 67553 }
Examples
function setSpeakIndex() { global_openEye_SDK.openEyeCall.setSpeakIndex(1, { response: setSpeakIndexResponse }); } function setSpeakIndexResponse(data) { console.info(data); if (data.result == 0) { console.info("SetSpeakIndex success") } else { console.error("SetSpeakIndex failed"); } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot