2014-01-08 149 views
1

這是我的jplayer代碼。問題是,它在Chrome,Opera,Firefox中正常工作,但在桌面上的Safari瀏覽器中瀏覽時,播放會有一些延遲。我不知道爲什麼會發生這種情況。請任何幫助或建議。Jplayer延遲播放

HTML:

<div id="#jpId1"></div> 

的JavaScript:如果你選擇jPlayer

$("#jpId1").jPlayer({ 
    ready: function() { // The $.jPlayer.event.ready event 
     $(this).jPlayer("setMedia", { // Set the media 
      wav: "sound/sound1.wav", 
     }).jPlayer("stop"); // Attempt to auto play the media 
    }, 
     ended: function() { // The $.jPlayer.event.ended event 
      $(this).jPlayer("play"); // Repeat the media 
     }, 
     supplied: "wav" 
    } 
); 
+0

添加循環:提供後爲true:「wav」, – shruti

回答

1

延遲將保持不變。作爲替代的選項是Web Api。您可以使用Web Api來避免延遲。
這裏是鏈接: Web Api