2012-03-21 84 views
1

我使用html5預加載器來預載我的音頻文件。它適用於所有瀏覽器和Android,但不適用於iPad。什麼是錯的代碼,音頻預加載器Jquery

http://code.google.com/p/html5-preloader/

<script language="javascript"> 
    $(document).ready(function() 
    { 
    var myLoader; 
    myLoader = new html5Preloader(); 
    myLoader.loadFiles('assets/audio/aaa.mp3','assets/audio/bbb.mp3','assets/audio/ccc.mp3','assets/audio/ddd.mp3','assets/audio/eee.mp3'); 

    myLoader.onfinish = function(){alert('Done')}; 

    myLoader.on('finish',function(){ 
    alert("Done"); 
     document.getElementById("loading_layer").style.visibility = "hidden"; 
    }); 

    myLoader.onerror = function(e){alert('Error occured while loading '+this.loadingFile); retu 

rn true; }; 

}); 
</script> 

回答

0

我相信Safari瀏覽器在iOS? 看着http://mobilehtml5.org/看來你需要6.0版的Safari(我假設)音頻標籤才能工作。是這樣嗎?

此外,預加載程序似乎已移至GitHub