同一首歌、同一個播放器,卻能讓進度條、播放鍵、停止鍵各自擺在不同位置,靠的是 embed 的 console 屬性。凡是 console 名稱相同的播放元件,會被瀏覽器視為同一個播放工作,控制彼此同步——這是當年做自訂播放列最常用的一招。
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td bgcolor="black">
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td bgcolor="#c0c0c0">
<embed height="20" src="1.rm" width="200"
console="sale" controls="PositionSlider">
</td>
</tr>
<tr>
<td bgcolor="#c0c0c0" nowrap>
<embed height="20" src="1.rm" width="40"
console="sale" autostart="false" controls="PlayButton">
<embed height="20" src="1.rm" width="40"
console="sale" autostart="false" controls="StopButton">
<embed height="20" src="1.rm" width="90"
console="sale" autostart="false" controls="PositionField">
</td>
</tr>
</table>
</td>
</tr>
</table>
PlayButton(播放)、PauseButton、StopButton(停止)、PositionSlider(可拖曳進度條)、PositionField(只顯示時間)、VolumeSlider(音量)、StatusField(狀態文字)等。版面則用巢狀表格加背景色撐出來:外層黑色當描邊,內層 #c0c0c0 當面板底色,cellpadding="1" 讓黑色露出來形成細邊框。nowrap 則避免按鈕被擠到下一行。
這個主題當年流傳的寫法多半是在 <body> 上寫 oncontextmenu="return false",但那只攔住選單,使用者仍能用鍵盤選單或工具列存圖,所以被戲稱「假的」。比較完整的做法會再攔 onkeydown 的某些鍵與 ondragstart,但結論其實很清楚:只要圖片已經送到瀏覽器,就沒有真正防得住的保護,攔右鍵只會妨礙正常操作、損害使用者體驗,也抵不了任何版權風險。
同樣地,embed 搭配 RealPlayer 外掛在現代瀏覽器已完全不支援。今天要做自訂播放列,請用 <audio controls> 或 <video>,隱藏原生控制列後,用 play()、pause()、currentTime 搭配 <input type="range"> 就能做出更漂亮且相容的版本。