function media_play(url){
alert("b");
alert(url);
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {mp3: url}); },
swfPath: "./js/",
supplied: "mp3",
volume:1.8,
preload: 'metadata',
solution: 'flash,html '
})
}
程序能进入函数,但是没有声音,url路径没有错,swfPath路径是什么作用的,只是播放MP3文件需要设置这个路径吗?
在浏览器不支持 html5时,采用 flash 播放,swfPath 放的是 flash 的地址
我猜,swfPath 应该是指 jquery.jplayer.swf 所在位置,主要是在 jPlayer 不能通过 HTML 播放,要使用 Flash 来播放时才能找到 jquery.jplayer.swf。