如何添加带有多个源mp3的媒体播放器 [英] How I can add a media player with several source mp3
问题描述
我正在寻找一种机制来显示具有多个源MP3的媒体播放器(附加图像).
I am looking for a mechanism to display a media player with multiple sources MP3 (attached image).
使用撇号标记:
<p:media value="http://www.stephaniequinn.com/Music/Mozart%20-%20Presto.mp3" width="200" height="20" player="quicktime" />
但是一次只能装一件.
推荐答案
我在 Wikplayer .它可能不完全是您想要的内容,但它完全是客户端(即JavaScript),并且随着您在网站上更改页面而继续播放.是的,它确实允许多个文件.
I've had good results with Wikplayer. It may not be exactly what you're looking for, but it's completely client-side (ie: JavaScript) and continues playing as you change pages on the site. And yes, it does allow multiple files.
例如,默认设置将产生以下代码:
For example, the default settings produces the following code:
<script type="text/javascript" src="http://www.wikplayer.com/code.js" data-config=" ... " ></script>
data-config
的内容是:
{
'skin': 'skins/wikfull/funkyBlue/skin.css',
'volume': 50,
'autoplay': false,
'shuffle': false,
'repeat': 0,
'showcomment': false,
'marqueetexton': true,
'placement': 'top',
'showplaylist': false,
'playlist': [
{
'title': '(SAMPLE)%20Canon%20in%20D%20-%20Pachelbel',
'url':'http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMK6heUdRr-E'
}
]
}
很明显,这些设置大多数都是做什么的,要添加更多的曲目,您要做的就是在playlist
数组中添加更多的对象,并分别指定title
和url
作为URL编码参数.
It's pretty obvious what most of these settings do, and to add more tracks all you have to do is add more objects the the playlist
array, specifying the title
and url
as URL encoded parameters each time.
这篇关于如何添加带有多个源mp3的媒体播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!