|
|
|
@ -27,15 +27,16 @@ Component({
@@ -27,15 +27,16 @@ Component({
|
|
|
|
|
|
|
|
|
|
lifetimes: { |
|
|
|
|
attached() { |
|
|
|
|
const innerAudioContext = wx.createInnerAudioContext(); |
|
|
|
|
innerAudioContext.obeyMuteSwitch = false; |
|
|
|
|
this.setData({ |
|
|
|
|
innerAudioContext: wx.createInnerAudioContext(), |
|
|
|
|
innerAudioContext, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
detached() { |
|
|
|
|
if (this.data.innerAudioContext) { |
|
|
|
|
this.data.innerAudioContext?.stop(); |
|
|
|
|
this.data.innerAudioContext.destroy() |
|
|
|
|
|
|
|
|
|
this.data.innerAudioContext.destroy(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|