Embed youtube video

To play YouTube video on your web page, do the following:

  1. While playing the video, right click on video.
  2. Select option 'copy embed code'.
  3. Paste it, on your HTML file.
<iframe width="420" height="345" src="https://www.youtube.com/embed/frT4kN4gxAs"> </iframe>

iframe youtube parameters

autohide
value 0: The player controls are always visible
Value 1: The player controls hides automatically when the video plays.
Value 2 (default): If the player has 16:9 or 4:3 ratio, same as 1, otherwise same as 0.

Syntax: <iframe src="http://www.youtube.com/embed/XGSy3_Czz8k?autohide=1"> </iframe>

autoplay
Value 0 (default): The video will not play automatically when the player loads.
Value 1: The video will play automatically when the player loads.

Syntax: <iframe src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1"> </iframe>

controls
Value 0: Player controls does not display. The video loads immediately.
Value 1 (default): Player controls display. The video loads immediately.
Value 2: Player controls display, but the video does not load before the user initiates playback.

Syntax: <iframe src="http://www.youtube.com/embed/XGSy3_Czz8k?controls=2"> </iframe>

loop
Value 0 (default): The video will play only once.
Value 1: The video will loop (forever).

Syntax: <iframe src="http://www.youtube.com/embed/XGSy3_Czz8k?loop=1"> </iframe>

playlist
A comma separated list of videos to play (in addition to the original URL).