seekForegroundAudio
简介
跳转音频播放进度
入参
| 属性 | 类型 | 必填 | 描述 |
|---|---|---|---|
| audioPlayerID | String | 是 | 音频任务的唯一标识 |
| position | Number | 是 | 单位秒。(仅支持到毫秒级别) |
| success | Function | 否 | 接口调用成功的回调函数 |
| fail | Function | 否 | 接口调用失败的回调函数 |
| complete | Function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
使用示例
// pages/index/index.js
Page({
seekForegroundAudio() {
dlt.seekForegroundAudio({
audioPlayerID: "bgmId",
position: 5,
success: function () {
console.log("success");
},
fail: function () {
console.log("fail");
},
complete: function () {
console.log("complete");
},
});
},
});