1
我使用jplayer 2.1.0。我有4個瀏覽器chrome 22,opera 12,IE9和mozilla firefox 15,截至2012年10月,這些瀏覽器都是最新的瀏覽器。我的播放器在chrome中工作,但在所有其他瀏覽器中都失敗。我現在沒有使用Flash,所以只是依靠HTML5。這是代碼。如何在firefox,opera和IE上使用jPlayer?
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function() {
var url;
$('.singles').click(function(event){
var x = event.target;
url = "http://localhost:8080/WebApplication1/songs/"+x.innerHTML;
$("#jquery_jplayer_1").jPlayer("setMedia",{
mp3: url
}).jPlayer("play");
});
},
swfPath: "/js",
supplied: "mp3, oga"
});
});
我直接在URL中使用文件路徑..這是不好的做法?
我應該通過服務器發送mp3文件嗎?如設置內容類型和一切嗎?..對不起,如果是愚蠢的,因爲我覺得自己很蠢這個自己
你輸入的網址是什麼? –
的網址是http:// localhost:8080/WebApplication1/songs/song_name.mp3 –