youtube embed video code example

Example 1: iframe autoplay

<!-- 
first add ?autoplay=1 to your video url
then add allow='autoplay' attribute to your iframe element
-->
<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1" allow='autoplay'></iframe>

Example 2: youtube embed video

//Author:Mohammad Arman Khan
<div>
       <iframe class="videoframe" src="https://www.youtube.com/watch?v=VfGW0Qiy2I0">
       </iframe>
</div>

Example 3: embed you tube video html 5

<video controls="controls" class="video-stream" x-webkit-airplay="allow" data-youtube-id="N9oxmRT2YWw" src="http://v20.lscache8.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPRVRMVV9FSkNOOV9MRllD&itag=43&ipbits=0&signature=D2BCBE2F115E68C5FF97673F1D797F3C3E3BFB99.59252109C7D2B995A8D51A461FF9A6264879948E&sver=3&ratebypass=yes&expire=1300417200&key=yt1&ip=0.0.0.0&id=37da319914f6616c"></video>