iphone微信 h5页音乐自动播放:

//        iphone自动播放
document.addEventListener("WeixinJSBridgeReady", function () {
document.getElementById('audio').play();
}, false);

  

    function musicShow() {
var a = $('#globalAudio').find('audio').get();
a.src = "http://www.calc.com.hk/Cards/HRshow/images/mlkg.mp3";
a.play();
// iphone自动播放
document.addEventListener("WeixinJSBridgeReady", function () {
document.getElementById('audio').play();
}, false); $('#globalAudio').off().on('touchstart', function() {
if (a.paused) {
a.play();
$(".u-globalAudio").removeClass("z-pause").addClass("z-play");
} else {
a.pause();
$(".u-globalAudio").addClass("z-pause").removeClass("z-play");
}
})
}
05-11 00:30