var innerAudioContext = this._audioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = false;
innerAudioContext.src = 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.mp3';
//..音频可以播放 取音频时长并计算
innerAudioContext.onCanplay( res => {
this.duration = this.durationCompute(innerAudioContext.duration)
console.log('可以播放了', this.duration)
})
console.log(JSON.stringify(innerAudioContext))
innerAudioContext.onPlay(() => {
console.log('开始播放');
});
z***@163.com (作者)
啥时候能更新?
2022-03-07 09:16
2***@qq.com
回复 z***@163.com: 你好,后续官方有解决吗,我现在也遇到这个问题了
2022-12-30 14:18