之前获取时长可以,但是有的音频文件就获取不到时长,时长是infinity,啥情况,是有路径的限制吗
// 获取当前音频时长
that.innerAudioCtx.onCanplay(() => {
console.log('oncanplay')
that.innerAudioCtx.duration;
setTimeout(() => {
console.log(that.innerAudioCtx.duration)
that.setData({
curAudioTime:that.innerAudioCtx.duration,
})
}, 10);
});
你好,具体是返回什么信息呢?详细描述下返回的具体信息