You can enable your video to start playing automatically when a user visits the page by adding autoplay=1 to the YouTube URL.
However, note that automatically starting a video can be intrusive for your visitors.
Note that in Chromium browsers, autoplay is generally restricted. However, muted autoplay is consistently permitted. |
To allow your video to start playing automatically (but muted), add mute=1 after autoplay=1 in the YouTube URL.
<iframe width=”420″ height=”315″ src=”https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1&mute=1″> </iframe> |
A comma-separated list of additional videos to play alongside the original URL.
To enable your video to loop indefinitely, add loop=1 to the YouTube URL.
<iframe width=”420″ height=”315″ src=”https://www.youtube.com/embed/tgbNymZ7vqY?playlist=tgbNymZ7vqY&loop=1″> </iframe> |
To hide controls in the video player, add controls=0 to the YouTube URL.
<iframe width=”420″ height=”315″ src=”https://www.youtube.com/embed/tgbNymZ7vqY?controls=0″> </iframe> |