play 播放录音
play ^7.8
播放录音
#请求参数
| Prop | Type | Required | Default | Comment |
|---|---|---|---|---|
params |
String |
Y |
N/A | url 音频路径 如:'/test_jack_record.wav' |
#接口调用示例
// 先注册回调接口
this.$bridge.setCallback(
(res) => {
console.log(res)
},
(err) => {
console.log(err)
}
)
const params = '/test_jack_record.wav'
this.$bridge
.play(params)
.then((res) => {
console.log('play-res', res)
})
.catch((err) => {
console.log('play-err', err)
})
#接口返回示例
// 数据将通过setCallback接口返回,详细数据请参考setCallback接口
N / A
#FAQ
tip
回调需要先注册 setCallback 函数,然后通过 setCallback 返回
浙公网安备 33010602011771号