Skip to content

获取当前播放属性 1.1.0

方法名

getAudioProperty

用法

用法示例

js
module.getAudioProperty(res => {
  console.log(res)
});

参数说明

回调

回调示例

json
{
    "data": {
        "speed": 1,
        "position": 33522,
        "duration": 328411
    },
    "message": "操作完成",
    "code": 0
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.speedFloat当前播放倍速
data.positionInteger当前播放位置,单位:毫秒
data.durationInteger音频时长,单位:毫秒
codeInteger返回类型,0.成功,其他:失败