当我尝试播放位于我的服务器上的文件时 jPlayer 没有播放。但如果我链接到 jPlayer 服务器中的演示文件,它工作正常。例如:
//this is working fine!
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
artist:"The Stark Palace",
mp3:"http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
oga:"http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg",
poster: "http://www.jplayer.org/audio/poster/
The_Stark_Palace_640x360.png"
}
], {
swfPath: "js",
supplied: "webmv, ogv, m4v, oga, mp3"
});
});
//]]>
</script>
但与位于我的服务器上的文件相同的代码不起作用:
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
artist:"The Stark Palace",
mp3:"http://www.myDomain/audio/mp3/TSP-01-Cro_magnon_man.mp3",
oga:"http://www.myDomain/audio/ogg/TSP-01-Cro_magnon_man.ogg",
poster: "http://www.myDomain/audio/poster/
The_Stark_Palace_640x360.png"
}
], {
swfPath: "js",
supplied: "webmv, ogv, m4v, oga, mp3"
});
});
//]]>
</script>
为了清楚起见,我已将相同的文件从 jPlayer 演示复制到我的服务器。有任何想法吗?