ios微信浏览器自动播放音乐
//ios自动播放音乐 function audioAutoPlay(id){ var audio = document.getElementById(id), play = function(){ audio.play(); document.removeEventListener("touchstart",play, false); }; audio.play(); document.addEventListener("WeixinJSBridgeReady", function () { play(); var a = document.getElementById('video') a.play() }, false); document.addEventListener('YixinJSBridgeReady', function() { play(); }, false); document.addEventListener("touchstart",play, false); } audioAutoPlay('media');