mediaGetSpeakIndex (Querying the Speaker in Use)
Interface Description
This interface is invoked to query the speaker in use and return the serial number of the speaker.
Notes
- The WebSocket connection with the OpenEye is set up.
- This interface is invoked for interface test or product commissioning. It will not be invoked in actual business scenarios.
Method Definition
OpenEyeCall.prototype.mediaGetSpeakIndex = function(callbacks)
Parameter Description
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
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. |
param |
Current microphone. |
The following is an example of input parameters of the callback method:
{ "description" : "tsdk_get_speak_index", "param" : { "index" : 0 }, "result" : 0, "rsp" : 67554 }
Examples
function mediaGetSpeakIndex() { global_openEye_SDK.openEyeCall.mediaGetSpeakIndex({ response: mediaGetSpeakIndexResponse }); } function mediaGetSpeakIndexResponse(data) { console.info(data); if (data.result == 0) { console.info("MediaGetSpeakIndex success"); } else { console.error("MediaGetSpeakIndex 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