Customize Youtube Player

Salam & Hello.

Bagi memenuhi permintaan Yabu Lala yang suruh saya buat tuto macam mana nak autoplay youtube video player dan macam mana nak ambik youtube palyer tu, so inilah dia tutorialnya. Hee~ :)

Youtube Player


1. Selepas copy embedded code dari youtube, paste code tersebut dimana-mana yang kita mahu, tapi sbelum save pastikan height embedded code tersebut ditukar kepada 25. lihat contoh di bawah.


Embedded code youtube video player yang asal:

<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/kYhT7oCDoqM&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kYhT7oCDoqM&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

2. Tukarkan height kepada 25. Width boleh tukar kepada berapa sahaja yang anda mahu.

<object width="560" height="25"><param name="movie" value="http://www.youtube.com/v/kYhT7oCDoqM&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kYhT7oCDoqM&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="25"></embed></object>

3. Selesai, boleh save. :)

Autoplay Youtube video player

1. Untuk autoplay lagu dari youtube pulak, just tambah code &autoplay=1 selepas video ID.

Lihat contoh:

<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/kYhT7oCDoqM&autoplay=1&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kYhT7oCDoqM&autoplay=1&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

2. Kemudian, boleh save.

Autoplay youtube player

Jika ingin youtube player sahaja tanpa video dan autoplay sekali boleh gabungkan kedua-dua code diatas. Contoh, tukarkan height kepada 25 dan tambahkan &autoplay=1 selepas video ID

Ia akan menjadi seperti ini:

<object width="560" height="25"><param name="movie" value="http://www.youtube.com/v/kYhT7oCDoqM&autoplay=1&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/kYhT7oCDoqM&autoplay=1&amp;hl=en_US&amp;fs=1?rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="25"></embed></object>

Ok, itu saja cukup sampai disini. Kalau ada pape nak tanya jangan segan silu bagitau dekat kotak komen dibawah wookei. Byess. :)

Source: YouTube Help. Thanks.

No comments:

Post a Comment