可易感的,可自定义的闪光媒体播放器。
您必须安装Flash!
XSPF自动点唱机是一位完全易碎的闪光媒体播放器。根据我对Fabricio Zuardi原始创作的修订。 Jukebox是全面的媒体播放器,支持MP3音频和FLV视频,该视频通过外部.xspf或.xml播放列表进行了解析。自定义皮肤与自动清点和许多可自定义的选项相结合,使XSPF自动点唱机成为基于Flash的媒体播放器的可靠选择。
.mp3音频和.flv视频(可选)自动在PHP,Python或JS中生成您的播放列表
编辑xplay.php文件的第一行,以指向您的媒体目录:
$media = "media"
编辑您想要的任何选项,默认情况下,播放列表缓存将打开。
<head> : <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<div>保存您的内容: < div id =" flashcontent " >
<!-- this will be replaced -->
</ div > < script >
var params = { } ;
params.wmode="transparent";
params.allowscriptaccess="always";
var url = "xspf_jukebox.swf?playlist_url=xplay.php & skin_url = skins / iTunes & param1 = value " ;
swfobject . embedSWF ( url , "flashcontent" , "skin width" , "skin height" , "7.0.0" , "" , { } , params , { } ) ;
< / script >请注意上面突出显示的值,您必须指定playlist_url和skin_url以及皮肤width和height的有效文件路径。您还可以在playlist_url之后指定任何可选参数。例如:
演示页面上.SWF的整个URL是:
xspf_jukebox . swf ? playlist_url = xplay . php & skin_url = skins / iTunes & autoplay = true & alphabetize = true & autoload = true & autoresume = true & main_image = images / artwork . jpg & shuffle = true & statsurl = stats . php就是这样!现在安装了XSPF自动点唱机。
可以对XSPF自动点唱机进行自定义,以便几乎所有需要在网络上播放音频或视频的任何需求。
您还可以使用以下两个参数代替playlist_url:
track_title :轨道标签track_url :轨道的URL playlist_url :XSPF文件的URL加载skin_url :皮肤文件夹的URLloadurl :URL链接到包含所有变量的文本文件。削减HTML编码和文件大小,许多播放器可以使用一个文件activeDownload :布尔值允许或禁止直接下载轨道,默认值为falsealphabetize :布尔值以字母表播放列表,默认值为falseautoload :布尔值,它使播放列表负载无初始用户单击,默认值为falseautoplay :使播放列表负载和音乐启动而无需初始用户单击的布尔值,默认为falseautoresume :允许多个页面上的玩家在用户浏览页面时无缝继续音乐的布尔值,默认为falsebuffer :播放前的几秒钟预加载视频,不包括自动crossFade :一个布尔值,当True设置为默认时间时,或淡入淡出的秒数(1-12),默认值为6秒forceAlphabetize :布尔值,全部字母表的力format :格式轨道标签的文本,使用“ -creator”,-title,-location''和“ -antotation插入各个值,默认值为” -CREATOR:-TITLEgotoany :迫使前往未知URL的布尔值,默认值为falseimage :自动播放关闭时显示的JPG图像的URLinfourl :所有歌曲的全球信息URL,填充缺席播放列表信息URLload_message :自动加载后显示的消息main_image :全局图像URL,填充缺席的播放列表图像mainurl :右键单击»“关于” urlmidChar :符合曲目的分离创建者和标题值的角色,格式覆盖,默认值为“::no_continue :打开自动歌曲更改的布尔值,默认值为falseplayer_title :标题文本,默认为“ xspf jukeboxrepeat :布尔值要设置重复,默认值为falserepeat_playlist :重复播放列表的布尔值,默认值为trueshuffle :布尔值设置洗牌,默认值为falsestart_track :开始轨道的轨道号,默认值为1statsurl :可以收集邮政值的外部脚本的URL。可以收集弹奏和注释timedisplay :显示时间计数器的数值; 0:OFF,1:全部,2:经过,3:持续时间,4:倒计时trackNumber :将曲目编号添加到标签中的布尔值,默认值为falseuseId3 :强制ID3标签使用的布尔值,默认值为falsevolume_level :启动音量级别百分比,默认值为100 XSPF Jukebox使用XSPF('Spiff')打开XML播放列表格式。一个简短的例子如下:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>url of .mp3 audio or .flv video file</location>
<creator>artist or creator of track</creator>
<title>title of track</title>
<annotation>used in place of creator/title if both are absent</annotation>
<duration>number of milliseconds of track duration</duration>
<info>url of info link</info>
<image>url of image, overwrites main_image parameter</image>
<purchase>url of purchase link</purchase>
</track>
</trackList>
</playlist>
<location> JavaScript接口已添加到播放器中,以允许对自动点唱机进行扩展控制。此功能仅适用于Flash 8版本。可用功能是:
playTrack() :播放/暂停轨道stopTrack() :停止轨道nextTrack() :前进到下一条曲目prevTrack() :返回前面的曲目shuffleToggle() :打开/关闭式洗牌repeatToggle() :打开/关闭gotoTrack(track number) :播放指定的曲目addTrack(track id, location, title, creator, info url, purchase url, image, annotation) :在播放列表中添加轨道要使用JavaScript控制自动点唱机,请确保您在对象中具有ID集,并为嵌入脚本嵌入标签。要调用函数,请使用格式:
window.document.xspfJukebox.playTrack();
例如:
<a href="javascript:window.document.xspfJukebox.playTrack();">Click to Play </a>
XSPF Jukebox使用自定义XML格式来指定播放器外观。 skin.xml文件以以下格式:
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0" xmlns="http://xsml.org/ns/0/">
<name>skin name</name>
<width>skin width</width>
<height>skin height</height>
<author>skin author</author>
<email>author?s email</email>
<website>author?s website</website>
<comment>author?s comments</comment>
<object>
all skin objects reside between the <object> tags
</object>
</skin>
<background x="" y="" width="" height="" scale="" image="" shape="" border="" color="" borderColor="" alpha="" /><image x="" y="" z="" width="" height="" image="" alpha="" url="" target="" hoverMessage="" /><shape x="" y="" z="" width="" height="" shape="" border="" color="" borderColor="" alpha="" url="" target="" hoverMessage="" /><text x="" y="" z="" size="" color="" font="" text="" border="" bold="" italic="" underline="" alpha="" url="" target="" hoverMessage="" /><playlist x="" y="" z="" width="" height="" size="" color="" font="" selectedColor="" bold="" italic="" underline="" alpha="" hoverMessage="" /><badge x="" y="" width="" height="" />所有函数对象均以标签开头,并通过label属性进行区分。大多数标签具有相似的属性,但是存在一些微小的差异。
<object label="playButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="playpauseButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="stopButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="prevButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="fwdButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="shuffleButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="repeatButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="scrollButton" x="" y="" z="" width="" height="" scale="" image="" color="" bgColor="" alpha="" bgAlpha="" hoverMessage="" /><object label="scrollupButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="scrolldownButton" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="startButton" x="" y="" z="" width="" height="" scale="" color="" alpha="" hoverMessage="" /><object label="infoButton" x="" y="" z="" size="" color="" font="" text="" bold="" italic="" underline="" target="" hoverMessage="" /><object label="purchaseButton" x="" y="" z="" size="" color="" font="" text="" bold="" italic="" underline="" target="" hoverMessage="" /><object label="downloadButton" x="" y="" z="" size="" color="" font="" text="" bold="" italic="" underline="" target="" hoverMessage="" /><object label="playDisplay" x="" y="" z="" width="" height="" scale="" color="" alpha="" hoverMessage="" /><object label="imageDisplay" x="" y="" z="" width="" height="" scale="" color="" alpha="" hoverMessage="" /><object label="videoDisplay" x="" y="" z="" width="" height="" scale="" alpha="" hoverMessage="" /><object label="trackDisplay" x="" y="" z="" width="" size="" color="" font="" text="" align="" bold="" italic="" underline="" hoverMessage="" /><object label="timeDisplay" x="" y="" z="" size="" color="" font="" text="" bold="" italic="" underline="" hoverMessage="" /><object label="fulltimeDisplay" x="" y="" z="" size="" color="" font="" text="" bold="" italic="" underline="" hoverMessage="" /><object label="volumeDisplay" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="timeBar" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" /><object label="loadBar" x="" y="" z="" width="" height="" scale="" image="" color="" alpha="" hoverMessage="" />playButton :播放按钮,在播放和暂停之间切换playpauseButton :静态播放暂停按钮,在播放和暂停之间切换stopButton :停止按钮,停止轨道prevButton :先前的按钮,更改为上一首曲目fwdButton :向前按钮,更改为下一个曲目shuffleButton :洗牌按钮,打开/关闭repeatButton :重复按钮,打开/关闭scrollButton :带有背景的滚动按钮,卷轴播放列表scrollupButton :上箭头,卷轴播放列表scrolldownButton :下垂的箭头,滚动播放列表startButton :一个矩形,指示单击位置开始加载或播放,将alpha设置为0infoButton :文本按钮以遵循播放列表中的当前信息链接purchaseButton :文本按钮遵循播放列表中当前的购买链接downloadButton :直接链接到当前播放mp3的文本按钮playDisplay :显示当前曲目图像imageDisplay :显示当前曲目图像videoDisplay :显示视频曲目trackDisplay :显示当前播放轨道timeDisplay :以标准格式00:00显示当前轨道时间,在时间,持续时间和剩余时间之间切换fulltimeDisplay :以完整格式显示当前轨道时间00:00/00:00,显示时间和持续时间volumeDisplay :显示一个音量栏以更改轨道音量timeBar :以条形显示当前轨道百分比,单击以扫描轨道loadBar :显示当前轨道的加载百分比x :数字:放置对象的X值或百分比y :数字:放置对象的y值或百分比z :数字:z值或对象的深度。width :数字:对象的宽度height :数字:物体的高度scale :数字:代替宽度/高度。在保留默认纵横比的同时缩放对象。 1 =无缩放size :数字:字体大小。尺寸必须先于Infobutton,pautobutton和downloadbutton的 +。例如:+15image :URL:加载图像代替默认符号shape :矩形/矩形/圆形/圆/三角形:绘制对象的形状border :数字:定义形状的边界宽度color :十六进制代码:设置对象的颜色。例如:FF0088borderColor :十六进制代码:设置形状边框的颜色bgColor :十六进制代码:设置对象背景的颜色selectedColor :十六进制代码:在播放列表中设置当前曲目的颜色font :字体名称:设置文本字体text :文字:显示的文字align :左/中心/右:仅用于TrackDisplay。对齐文字bold :布尔值:设置文本大胆打开/关闭italic :布尔:设置文本斜体开/关underline :布尔值:设置文本下划线开/关alpha :百分比:设置对象的alpha通道bgAlpha :百分比:设置对象背景的alpha通道url :URL:允许对象链接到网页hoverMessage :文字:鼠标上显示的消息麻省理工学院©Lacy Morrow