如何讓YouTube自動重複~影片、歌曲循環播放?
如何讓YouTube自動重複~影片、歌曲循環播放?
這是、YouTube嵌入影片的嵌入程式碼
<iframe width="400" height="280" src="https://www.youtube.com/embed/U9tr8LmycfU" frameborder="0" allowfullscreen></iframe>
綠色的部分為影片的 ID 或檔案名字
重複播放(Loop)功能並不是YouTube的預設功能之一
所以 當你想重複循環聽音樂時就會顯得不太方便。
今天、我要來教大家一些小撇步,如何在YouTube的嵌入程式碼內加入參數,組合出各種不同的撥放模式。
自動播放的參數
autoplay=1 重複播放的參數 loop=1
播放清單的參數 playlist=id-1,id-2,id-3,N....
播放完畢不顯示相似的Music參數 rel=0
播放合輯的參數 ?list
= list_ID隱藏上方Title標題的參數 showinfo
=0隱藏下面撥放控制列的參數 controls=0
撥放開始時間的參數 start
= 50 (秒)播放結束的時間的參數 end
= 120 (2分鐘)隱藏全螢幕播放按鈕的參數 sf
=0其他的參數... 大概不太會用到 ~ 就不列出
賀~ 廢話不多說、直接看範例 吧!!

加入自動播放的參數
autoplay=1 <iframe width="400" height="280" src="https://www.youtube.com/embed/U9tr8LmycfU
?autoplay=1" frameborder="0" allowfullscreen></iframe>
自動重複播放的參數 autoplay=1&loop=1<iframe src="https://www.youtube.com/embed/U9tr8LmycfU?
autoplay=1&loop=1&playlist=U9tr8LmycfU" width="400" height="320" frameborder="0" allowfullscreen=""></iframe>
組合播放清單 (音樂盒)<iframe src="https://www.youtube.com/embed/?playlist=U9tr8LmycfU,eIz1rG_1Z50,8IdFzapq83c" width="400" height="320" frameborder="0" allowfullscreen=""></iframe>
自動播放清單 (音樂盒)<iframe src="https://www.youtube.com/embed/U9tr8LmycfU?
autoplay=1&playlist=eIz1rG_1Z50,8IdFzapq83c" width="400" height="320" frameborder="0" allowfullscreen=""></iframe>可以在後面、再加上重複播放的參數
&loop=1 
播放合輯的參數 ?list
= list_ID <iframe width="600" height="350" src="https://www.youtube.com/embed/?list=PLmZQe32I5XKjY3f8TnIGttT-IBN2YUXtx
&rel=0&index=4" frameborder="0" allowfullscreen></iframe>
舊 
