jquery flowplayer不播放mp3
在下面的代码中,我使用了一个用于播放歌曲的流播放器。很多问题是 http://release 的插入。 ......为什么我不能使用我网站目录中下载的那个 即,而不是这个 f("音频", "http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf",
我想用这个 f("audio", "/var/site/media/flowplayer-3.2.5.swf",
当我包含 /var/site/media/flowplayer-3.2.5.swf
我收到一条错误消息,提示找不到 mp3 文件。我做错了什么
<script>
$(document).ready(function () {
$f("audio", "http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf", {
// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30,
autoHide: false
}
},
clip: {
autoPlay: false,
// optional: when playback starts close the first audio playback
onBeforeBegin: function() {
$f("player").close();
}
}
});
});
</script>
<div id="audio" style="display:block;width:350px;height:30px;" href="/var/site/media/a.mp3"></div>
In the following code i use a flow player that is used to play a song.Muy question is that insted of http://release........ why cant i use the downloaed one which resied in my site directory
i.e, instead of thisf("audio", "http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf",
i want to use thisf("audio", "/var/site/media/flowplayer-3.2.5.swf",
When i include /var/site/media/flowplayer-3.2.5.swf
i get an error saying mp3 file not found.What am i doing wrong
<script>
$(document).ready(function () {
$f("audio", "http://releases.flowplayer.org/swf/flowplayer-3.2.5.swf", {
// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30,
autoHide: false
}
},
clip: {
autoPlay: false,
// optional: when playback starts close the first audio playback
onBeforeBegin: function() {
$f("player").close();
}
}
});
});
</script>
<div id="audio" style="display:block;width:350px;height:30px;" href="/var/site/media/a.mp3"></div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MP3 播放器在您的浏览器中运行。浏览器无权访问服务器的本地文件系统。
您始终需要指定一个指向 MP3 文件的 URL,就像在第一个示例中所做的那样。
The MP3 player runs in your browser. The browser does not have access to your server's local file system.
You will always need to specify a URL pointing to the MP3 file like you do in your first example.