- On a computer, go to the YouTube video that you want to embed.
- Under the video, click Share .
- Click Embed.
- From the box that appears, copy the HTML code.
- Paste the code into your blog or website HTML.
Use the steps above to embed your video through youtube first and then add the autoplay=1 to your video url.
Example :
Youtube code
|
|
<iframe width="560" height="315"
src="https://www.youtube.com/embed/byaVF9RwyR0"
frameborder="0" allow="accelerometer; autoplay;
encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
|
<iframe width="1" height="1" src="https://www.youtube.com/embed/byaVF9RwyR0? rel=0&controls=0&showinfo=0;autoplay=1&mute=0" frameborder="0" allow="autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
Example :
- <iframe width="1" height="1" src="https://www.youtube.com/embed/byaVF9RwyR0? rel=0&controls=0&showinfo=0;autoplay=1&mute=0" frameborder="0" allow="autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Sourse : here
No comments:
Post a Comment