错误视频:https://todowechat.oss-cn-hangzhou.aliyuncs.com/mp3/55f3a206761850575ef6e6756f448027.mp4
微信7.0.12 createInnerAudioContext音频播放速度变慢IOS下播放音频速度变慢,100%复现,已在6种不同IOS机型上测试,最新版本微信产生的bug 音频格式已经尝试过mp3/aac/wav/m4a,均有问题 const innerAudioContext = wx.createInnerAudioContext() innerAudioContext.obeyMuteSwitch = false Page({ data: { tip:"", audioSrc:"https://todowechat.oss-cn-hangzhou.aliyuncs.com/mp3/day1-02.mp3", name:"测试name", author:"测试作者" }, onLoad: function (options) { let _this = this innerAudioContext.onPlay(() => { _this.setData({ tip: "正在播放" }) }) innerAudioContext.onError((res) => { console.log(res.errMsg) console.log(res.errCode) }) innerAudioContext.onEnded((res) => { _this.setData({ tip: "播放结束" }) }) this.audioCtx = wx.createAudioContext("myAudioCtx") }, //有Bug的播放 playBug: function () { innerAudioContext.src = this.data.audioSrc innerAudioContext.seek(0) innerAudioContext.play() }, //无Bug的播放 playNoBug: function () { this.audioCtx.play() } })
2020-03-23