# 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)
})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 接口返回示例
// 数据将通过setCallback接口返回,详细数据请参考setCallback接口
N / A
1
2
2
# FAQ
tip
回调需要先注册 setCallback
函数,然后通过 setCallback
返回