wx.createInnerAudioContext() IOS无法播放
wx.createInnerAudioContext(), IOS无法播放,Android可以,相关代码:
var url = ‘某一个音频地址’;
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.autoplay = true
innerAudioContext.src = url
innerAudioContext.onPlay(() => {
Toast.over(‘正在播放’, ‘none’)
})
innerAudioContext.onError((res) => {
Toast.over(‘加载语音失败’, ‘none’)
})