dewplayer-playlist.swf 是以清單的方式執行樂曲的播放
同時 dewplayer-playlist.swf 也適用於單曲的播放
首先介紹單曲的 最基本語法
※ 最基本語法 裡面的元素不能缺少一個,否則不能播放
<object data="http://.../dewplayer-playlist.swf" height="20" width="240">
<param name="flashvars" value="mp3=http://.../*.mp3">
</object>
只要替換掉 紅色 文字即可
現在播放的音樂範例是由 Dewplayer 網頁所下載的 test2.mp3
請點選 播放按鈕 即可聽見音樂
語法內加入其它參數
<object data="http://.../dewplayer-playlist.swf" width="240" height="20" bgcolor="0000ff">
<param name="flashvars" value="mp3=http://.../test1.mp3|http://.../test2.mp3|http://.../test3.mp3&volume=50&autostart=0&autoreplay=1&randomplay=1">
</object>
參數 及 宣告 的解說
宣告 | |
data="--" | (--) 代表播放器在網路上的網址 |
width="240" | 設定播放器寬度為 240 |
height="20" | 設定播放器高度為 20 |
bgcolor="0000ff" | 背景顏色色碼此為藍色〈這裡可接受大寫 "0000FF"〉 |
wmode="transparent" | 播放器背景顏色透明化〈本例已有藍色背景〉 |
參數 | |
| | 分隔欲播放的 MP3 |
&volume=50 | 調整音量大小〈從 0 到 100〉 |
&autostart=0 | 關閉自動播放功能〈把 0 改為 1 為開啟〉 |
&autoreplay=1 | 開啟重複播放功能〈把 1 改為 0 為關閉〉 |
&randomplay=1 | 開啟隨機播放功能〈把 1 改為 0 為關閉〉 |
現在播放的音樂是由 Dewplayer 網頁所下載的 test1.mp3 , test2.mp3 , test3.mp3
請點選 播放按鈕 即可聽見音樂
※ 多曲隨機播放時曲目跑馬燈會發生錯誤情況,以清單方式播放則正確無誤
接下來是清單的語法
※ 寬度及高度的 設定值 為 width="240" height="200"
<object data="http://.../dewplayer-playlist.swf" width="240" height="200" bgcolor="ffffff">
<param name="flashvars" value="xml=http://.../playlist.xml&volume=50&autostart=0&autoreplay=1&randomplay=1">
</object>
語法中 value="xml= 有別於單曲的 value="mp3=
播放清單檔 playlist.xml 放在 Dewplayer 網頁所下載的壓縮檔中
修改 playlist.xml 裡面的內容再上傳至網路空間
※ playlist.xml 的檔案格式為 UTF-8
playlist.xml 檔內的 <track> 標籤設置
<location>--</location> | 在 "--" 處輸入 MP3 網址 |
<title>--</title> | 在 "--" 處輸入曲名 |
現在播放的是 test1.mp3 , test2.mp3 , test3.mp3
請點選 播放按鈕 或 清單條列 即可聽見音樂
以 width="240" height="20" 的型態播放
請點選 播放按鈕 即可聽見音樂
舊語法
<embed width="240" height="200" src="http://.../dewplayer-playlist.swf?xml=http://.../playlist.xml&autostart=0&autoreplay=1&volume=50&randomplay=1" wmode="transparent"></embed>
現在播放的是 test1.mp3 , test2.mp3 , test3.mp3
請點選 播放按鈕 或 清單條列 即可聽見音樂
※ Dewplayer 網頁上有些參數在 dewplayer-playlist.swf 上沒有作用
播放器上更改文字顏色 (預設值為白色),目前筆者還測試不出結果
Dewplayer 網頁上註明可使用 JavaScript controls
播放器上更改文字顏色 (預設值為白色),目前筆者還測試不出結果
Dewplayer 網頁上註明可使用 JavaScript controls
主題網站
超連結 → alsacréations 網站 (法文) 的英文網頁 Dewplayer (含下載點)
相同文章存放於
痞客邦 PIXNET 的 foster 網頁
沒有留言:
張貼留言