audio 预加载

 

http://www.w3school.com.cn/tags/av_event_loadeddata.asp

 

var audio = document.createElement("audio");
audio.src = "bg.mp3";
audio.load();

audio.addEventListener("canplaythrough",
function() {
    audio.play();
},
false);

 

Tips : 

https://createjs.com/

create.js 怎么会这么棒

 

posted @ 2017-10-27 15:05  echolife  阅读(469)  评论(0编辑  收藏  举报