九
getBackgroundAudioManager ios 没有声音?const backgroundAudioManager = wx.getBackgroundAudioManager(); play(e){ this.backmusic() let id = e.currentTarget.dataset.id; let src = e.currentTarget.dataset.src; this.audioCtx = wx.createAudioContext(e.currentTarget.dataset.name) if(this.data.nowid == id && this.data.nowflog == true){ backgroundAudioManager.pause() this.setData({ nowflog:false, nowid:null, }) }else if(this.data.nowid != id){ if(this.data.nowname != null){ this.audioCtx1 = wx.createAudioContext(this.data.nowname); backgroundAudioManager.pause() } console.log(this.audioCtx); backgroundAudioManager.title = e.currentTarget.dataset.name backgroundAudioManager.src = src this.setData({ nowid:id, nowurl:src, nowname:e.currentTarget.dataset.name, nowflog:true }) } }, app.json 已经配置
2021-09-16