解决audio在苹果机播放无声音
作者:互联网
<audio id="bgmusic" src="/static/media/flipsound.mp3" preload></audio> // audio音频 var audio = document.getElementById("bgmusic"); if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") { // IOS WeixinJSBridge.invoke('getNetworkType', {}, function (res) { audio.play(); }); }else{ // Android audio.play(); }
标签:function,play,播放,invoke,WeixinJSBridge,typeof,audio,苹果机 来源: https://www.cnblogs.com/zhaoying/p/16308244.html