createInnerAudioContext在mac微信开发者工具上无效
const innerAudioContext = wx.createInnerAudioContext() Page({ onLoad() { [代码]innerAudioContext.autoplay = true[代码] [代码]innerAudioContext.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'[代码] [代码]innerAudioContext.onPlay(() => { [代码] [代码] console.log('开始播放')[代码] [代码] })[代码] [代码]innerAudioContext.onError((res) => { [代码] [代码] console.log(res.errMsg) [代码] [代码] console.log(res.errCode)[代码] [代码] })[代码] } }) 该实例在微信开发者工具中既不进入onError也不进入onPlay,src也赋值不成功。
但在IOS手机上预览又可以。