以OK GO的White Knuckles為例,本影片要嵌入的語法為
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
效果為
而當要自動播放的時候,只要在原本影片網址後方加上&autoplay=1,就會變成:
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
效果為
而且循環播放的話也是一樣在網址後面加上參數,這次是加上&loop=1
效果為
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW&loop=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nHlJODYBLKs?fs=1&hl=zh_TW&loop=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
效果為
這樣,靠著簡單的參數就能達到自動播放及循環播放嚕!!~
0 意見:
張貼留言