我想调用手表的录音功能,但是安装官方的文档却报错了,求解
手表:Xiaomi Watch S4
文档地址:https://iot.mi.com/vela/quickapp/zh/features/system/record.html
源代码:
手表:Xiaomi Watch S4
文档地址:https://iot.mi.com/vela/quickapp/zh/features/system/record.html
源代码:
报错日志:record.start({
duration: 10000,
sampleRate: 8000,
numberOfChannels: 1,
encodeBitRate: 128000,
format: "pcm",
success: function (data) {
console.log(handling success: ${data.uri}
)
},
fail: function (data, code) {
console.log(handling fail, code = ${code}, errorMsg=${data}
)
},
complete: function () {
console.log(handling complete
)
}
})
[09/30 19:07:30] [47] [ap] [AIOTJS] [jse_dump_obj:786] TypeError: cannot read property 'start' of null
[09/30 19:07:30] [47] [ap] [AIOTJS] [jse_dump_obj:786] at routeDetail (/data/quickapp/app/com.application.watch.demo/pages/index/index.js:90)
at apply (native)
at <anonymous> (@aiot/framework)
at click (/data/quickapp/app/com.application.watch.demo/pages/index/index.js:166)