(修改前)
<iframe width="560″ height="315″ src="http://www.youtube.com/embed/L5vAFegCIdQ" frameborder="0″ allowfullscreen></iframe>
(修改後)
<iframe width="560″ height="315″ src="http://www.youtube.com/embed/L5vAFegCIdQ &autoplay=1" frameborder="0″ allowfullscreen></iframe>
FJU TALENTS 2019 (20190922)
<iframe width="560" height="315" src="https://www.youtube.com/embed/5wNa4vFwlmg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/5wNa4vFwlmg &autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
備用程式碼
<iframe src="https://www.youtube.com/embed/5wNa4vFwlmg" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span></iframe>
這是從Youtube得來的嵌入碼:
<iframe title="YouTube video player" width="560" height="349" src="http://www.youtube.com/embed/xHMkBFreJLA?hd=1" frameborder="0" allowfullscreen></iframe>
我們需要修改的只有紅色那一串,
以下就讓我們依照下面兩種不同需求來針對這一串網址進行修改吧~
1. 重複播放
新版重複播放改法很簡單,請改成這樣:
『http://www.youtube.com/embed/xHMkBFreJLA?hd=1&loop=1&playlist=xHMkBFreJLA』
注意到藍色的那一段是由『&loop=1』以及『&playlist=xHMkBFreJLA』所組成的,
其中橘色的是Youtube的代碼,
也就是上面紅色的那一串網址中粗斜體的部份,
記住在新版的iframe嵌入語法『loop』及『playlist』都要加入才會自動播放唷。
寫在裡面
=======================================================================
Joomla HTML 範例:
<p style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="720" src="https://www.youtube.com/embed/gwI-ZexHpJA?rel=0&autoplay=1&loop=1&playlist=gwI-ZexHpJA" width="1280"></iframe></p>
loop=1
影片播放結束後顯示其他建議的影片 取消!!