嗨,夥計們我已經嘗試幾乎所有關於這個問題,並嘗試在這個論壇上的每一個解決方案,仍然無法找出解決這個問題的解決方案。儘管給出了正確的swf路徑,但我無法播放來自Jplayer的mp3文件。文件都打在Chrome和IE瀏覽器,但在Firefox中沒有Jplayer儘管所有的努力沒有在Firefox中玩
<script>
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function() {
$(this).jPlayer("setMedia", {
mp3:"<?php echo Zend_Registry::getInstance()->constants->img_profilepath . $this->acc->Username . '/' . Zend_Registry::getInstance()->constants->img_albumpath . '/' . $this->album->Id . '/' . Zend_Registry::getInstance()->constants->audio_path . '/' . $this->playsong->Id . $this->playsong->Audio; ?>"
}).jPlayer("play");
},
swfPath: "http://www.jplayer.org/latest/js/Jplayer.swf",
solution:"html,flash",
supplied: "mp3",
cssSelectorAncestor: ""
});
document.getElementById("track-title").innerHTML='<h6 class="subheader"><marquee><?php echo$this->playsong->Title;?></marquee></h6>';
});
</script>
這是當媒體播放
function play(url,title,songid)
{
$("#jquery_jplayer_1").jPlayer("setMedia",
{
mp3: url
});
$("#jquery_jplayer_1").jPlayer("play", 0);
document.getElementById("track-title").innerHTML='<h6 class="subheader"><marquee>'+title+'</marquee></h6>';
$.post('/audioplayer/played',
{'songid' : songid});
}
}
是否有任何javascript錯誤? – 2013-02-18 17:33:07