Updated on 2023-10-12 GMT+08:00

setMicVol (Setting the Microphone Volume)

Interface Description

This interface is invoked to set the microphone volume.

Notes

The WebSocket connection with the OpenEye is set up.

Method Definition

OpenEyeCall.prototype.setMicVol = function(volume, device, callbacks) 

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

volume

Number

Mandatory

Volume. The value ranges from 0 to 100.

device

Number

Mandatory

Device type. Set this parameter to 1.

callbacks

Callback

Optional

Callback method.

Table 2 Callback

Parameter

Type

Mandatory/Optional

Description

response

function

Mandatory

For details about the input parameters of the callback method, see Table 3.

Table 3 Input parameters of the callback method

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_mic_volume",
   "result" : 0,
   "rsp" : 67577
}

Examples

 function setMicVol() {
    global_openEye_SDK.openEyeCall.setMicVol(20, 1, {
        response: setMicVolReponse
    });
}

function setMicVolReponse(data) {
    console.info(data);
    if (data.result == 0) {
        console.info("SetMicVol Success.")
    } else {
        console.error("SetMicVol failed.");
    }
}