innerAudioContext在Ios上没声音

发布于 7 年前作者 liaochao12663 次浏览最后编辑 7 年前来自 ask

安卓上播放正常,ios上面就没声音

4 回复
hqian
hqian1 楼6 年前

我也碰到了同样的问题,在安卓机型上可以播放,但是在苹果手机上不能播放,innerAudioContext.play()没有生效

rye
rye3 楼6 年前

楼主,这个问题解决了吗,是什么原因?

qiang01
qiang014 楼5 年前

onLoad:function(){    

   //异步

    network.request(){

        success:res=>{

            var innerAudioContext = wx.createInnerAudioContext()

            innerAudioContext.onPlay(()=>{}

            innerAudioContext.src = res.music

            innerAudioContext.obeyMuteSwitch = false

            innerAudioContext.play()

        }

    }

}