wx.createInnerAudioContext退出当前页,背景音乐无法停止
- 当前 Bug 的表现(可附上截图)
- 预期表现
- 复现路径
- 提供一个最简复现 Demo
onLoad: function (options) {
this.innerAudioContext = wx.createInnerAudioContext();
},
onShow: function () {
this.innerAudioContext.src = myData2.commonData.music;
this.innerAudioContext.loop = true;
this.innerAudioContext.play();
}
,
onHide:function(){
let that = this
console.log(2)
this.innerAudioContext.pause()
},
onUnload:function(){
let that = this
console.log(3)
this.innerAudioContext.pause()
},
wx.createInnerAudioContext退出当前页面,或者隐藏后。无法停止播放,请问有什么解决方法?
试了stop,pause(),destroy(),测试的前面几次音乐停止了,次数一多之后就不行了,是怎么回事?
1 回复