一個可能更方便的 blog audio 播放方法 - XSPF Web Music Player + Webjay
December 23, 2005發現了這個 XSPF Web Music Player - 一個播放 mp3 的 flash-based 音樂播放器。
官方網站︰
http://musicplayer.sourceforge.net/
這個音樂播放器 import 的 playlist 是以 xspf 格式,
根據 Xiph Open Source Community ︰
|
XSPF is the XML format for sharing playlists. |
其實功能就好像早陣子 blog 界很 hit 的 radio.blog,或之前有 blogger 報導過的 Dew Player,
都是import 一個 music list,然後在 blog 上播放。
雖然功能好像差不多,但我認為若把 ﹝XSPF Web Music Player﹞ 加上 ﹝Webjay.org﹞一起運用,將會為 blog 帶來更方便的 blog radio 音樂服務。
何解?
● 因為 XSPF Web Music Player 可以無需要你找個網上空間 upload 個 flash file。它現成有一個 flash file 公開讓 personalised google 使用者 link 過去作 personalised google 音樂 module 的,故此照道理你也可以 link 過去它那個 flash file 來放在你的 blog 上。
● Webjay.org 是被稱為 “mother of all music playlist generators” (參閱此網頁)。它讓你輕輕鬆鬆組織你的 mp3 音樂 playlist,也為你 generate 你想要的 playlist 格式。 故此,每當你需要新增或更改你的 music playlist,你就無需像以往修改那段你見到都頭暈的 code ,而只需要登入你的 webjay account,讓它為你 organise 你的 playlist。
● XSPF Web Music Player 有三種 play mode - slim mode、extended mode、button mode 任君選擇。
第一步︰為你的音樂產生一個 xspf 格式 playlist
(1) 到 http://webjay.org 。
(2) 按 左上方 panel 的﹝create﹞按鈕,然後申請一個帳號。
(4) 按 ﹝make playlist﹞,為你的新 playlist 命名。
(5) 然後就可以逐一填上你的 mp3 位置及資料。
(6) 當所有 mp3 資料已輸入好,你就可以取得你的 xspf playlist 位置。方法很簡單︰
i. ) 按 左上方 panel 的﹝create﹞按鈕,它會為你顯示你所建立過的 playlist。把你的滑鼠放在你所建立的 playlist 連結上,按滑鼠右鍵,點選 < 複製連結網址 > 來記下 playlist 的網址。
( 格式會類似︰ http://webjay.org/by/userName/playlistName
例子︰http://webjay.org/by/qoosmicah/demoforusing )
ii. ) 在這條連結的尾部加上 .xspf
( 即︰http://webjay.org/by/userName/playlistName.xspf
例子︰http://webjay.org/by/qoosmicah/demoforusing.xspf )
你便成功取得你的 xspf playlist網址!
第二步︰於 blog 上加插 音樂播放器
|
款式一︰SLIM MODE <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" |
|
款式二︰EXTENDED MODE (1) <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="180" id="xspf_player" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://musicplayer.sourceforge.net/xspf_player.swf?playlist_url=你的.XSPF網址&autoload=true" /> <param name="quality" value="high" /> <param name="bgcolor" value="#e6e6e6" /> <embed src="http://musicplayer.sourceforge.net/xspf_player.swf?playlist_url=你的.XSPF網址&autoload=true" quality="high" bgcolor="#FFFFFF" width="400" height="180" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> |
|
款式二演變版 (無左邊音樂資訊)︰EXTENDED MODE (2) 相關 code (跟 extended (1) 分別在於個 width set 細一點)︰ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" |
|
款式三︰BUTTON MODE <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" |
成了!
而以後若要更改 playlist (例如 加 / 減 音樂,就只需要登入 webjay.org modify 個 playlist ),非常方便!
可加上參數 (PARAMETERS)
另外,透過更改這 player 的一些參數,你可以為這 player 作一點 customization。參數包括︰
| playlist_url : the url of the xspf file to load autoplay : boolean value that make the music start without the initial user click autoload : boolean value that make the playlist load without the initial user click repeat_playlist : boolean value that make the repeats the playlist after the end of the last song playlist_size : number of tracks to limit player_title : the text to replace the players default’s info_button_text : the text to display on the info link, see this page radio_mode : boolean value, if true tells the player that the last track of playlist is in real a new playlist location. 詳細資料請參考 管方 documentation |
例如,你若想個 playlist 會 repeat (重複播放),就可以在你的 code 內的兩句 .xspf 後加上 &repeat_playlist=true。換句話,若你用的是 slim mode,程序碼將會是︰
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="400" height="15"
id="xspf_player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://musicplayer.sourceforge.net/xspf_player_slim.swf?playlist_url=你的.XSPF網址&repeat_playlist=true"
/>
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<embed src="http://musicplayer.sourceforge.net/xspf_player_slim.swf?playlist_url=你的.XSPF網址&repeat_playlist=true"
quality="high" bgcolor="#e6e6e6" width="400"
height="15" name="xspf_player" align="middle"
allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"
/>
</object>
需留意的地方︰
這個 XSPF musicplayer 也設有下載音樂功能 (滑鼠右鍵功能),這比起其他網上現有的音樂播放器更為方便,但同時間也需要 blogger 們注意所播放的音樂的相關版權問題。
另外,Webjay.org會在你 playlist裡面加插一個它的 “playlist courtesy”,類似為它賣廣告吧,但這個我認為不太成問題,因為整個廣告只是播放簡短 “webjay” 一字一次而己,不會太阻礙收聽。
這個 musicplayer 似乎不支援中文顯示。
可參考我 blog sidebar 裡的播放器。
更多關於此音樂器的設置問題,或想下載該 flash 檔案,可到官方網站︰http://musicplayer.sourceforge.net/。


很實用啊!謝謝妳的介紹。我放完假定要試試!
Comment by agnesleung — December 24, 2005 @ 9:40 am
agnesleung:
holiday? u mean vacation?
i thought u are a full time housewife..
(sorry i have no chinese input at the moment…)
Comment by .米迦. — December 24, 2005 @ 4:05 pm
very good to have it in my blog!!! Thx!!
Can we repeat to play the songs? reccurent playing the whole playlist?
Comment by Pinreader — February 9, 2006 @ 5:04 pm
Pinreader:
可以!我在此 post 內剛新增了一個 section 叫 “可加上參數 (PARAMETERS)”,那裡說明如何為你的 player 加上各不同 parameters… =)
Comment by .米迦. — February 11, 2006 @ 2:01 pm
HELLO!! 我想在自己BLOG裏加上音樂,在網上找到你這篇文章,很詳細易明! 感謝感謝!!
Comment by nova — March 16, 2006 @ 3:00 pm
nova:
你的 comments 很鼓勵啊! =)
多謝你告訴我… =>
Comment by .米迦. — March 18, 2006 @ 2:21 am
真是好介紹啊~
thanks~
btw, 佢show唔到中文?
Comment by sugar — May 3, 2006 @ 2:45 pm
sugar:
係呀,好似 show 唔到中文呀,
你能 show 到中文嗎?
Comment by .米迦. — May 5, 2006 @ 2:01 am
可不可以在每一次載入player的時候都randomize playlist一次呢?
Comment by Justin — May 25, 2006 @ 11:56 pm
Justin:
Hi… nice to meet you here!
Randomize… 我唸就應該唔得…
至於其他 parameters, 你可以到︰〈這裡〉參考來 customize 個 player 的。
Comment by .米迦. — May 26, 2006 @ 1:29 am
那個呢.....>人人
這倒是成功了,可是在player下面卻留了一塊空位,
所以想請問一下可以除去那片空位的嗎?>人V
Comment by isako — June 12, 2006 @ 9:59 pm
那個.....>人
用這個就成功了,可是在我的player下面,
卻有著一大片刪不去的空位,
想請問一下這片空位可以刪掉的嗎?>人VV
Comment by isako — June 12, 2006 @ 10:14 pm
isako:
hello, nice to meet you!
我猜想下面的多餘空位是 height 參數定得太長了。
你尋找 code 內的
height=”180″
然後自行更改那個值細少一點
多餘空位就會除去。
Comment by .米迦. — June 13, 2006 @ 2:43 am
那個,我成功了,感謝你啊!>v
Comment by isako — June 15, 2006 @ 1:53 am
isako:
That’s great! You are welcome!! =)
Comment by .米迦. — June 17, 2006 @ 9:10 am
我是用Yahoo Blog的,請問這工具支援嗎?
如果是放不進Yahoo Blog的話,可以介紹其它能與Yahoo Blog容進嗎?
感謝您的回覆!
Comment by albert — February 29, 2008 @ 2:33 am
albert:
我嘗試幫你研究過,我唸 yahoo blog 是不能 embed 這個 flash player 的…
不如你轉 blog 吧…
Comment by .米迦. — March 6, 2008 @ 2:18 pm