更新时间:2023-10-12 GMT+08:00
setMicVol(设置麦克风音量)
接口描述
设置麦克风音量大小。
注意事项
已经建立与OpenEye的WebSocket连接。
方法定义
OpenEyeCall.prototype.setMicVol = function(volume, device, callbacks)
参数描述
|
参数名 |
类型 |
可选/必选 |
描述 |
|---|---|---|---|
|
volume |
Number |
必选 |
音量大小,取值范围[0, 100]。 |
|
device |
Number |
必选 |
设备类型。设置为1。 |
|
callbacks |
可选 |
回调方法。 |
回调方法的入参示例:
{
"description" : "tsdk_set_mic_volume",
"result" : 0,
"rsp" : 67577
}
使用示例
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.");
}
}
父主题: 设备管理