Autoplay Embedded Youtube Videos

You may want to autoplay some Youtube videos when you  embed them in a website. By default, this is disabled (which is actually good). Here are the simple instructions to enable autoplay:

Go to the Youtube video you’d like to embed in your website, click Share then Embed and copy the iFrame code which should look like:

<iframe width=”560″ height=”345″ src=”http://www.youtube.com/embed/hOrJqV13TKs?rel=0″ frameborder=”0″ allowfullscreen></iframe>

In order to enable Youtube autoplay, simply change the code as follows:

<iframe width=”560″ height=”345″ src=”http://www.youtube.com/embed/hOrJqV13TKs?rel=0&amp;autoplay=1” frameborder=”0″ allowfullscreen></iframe>

That’s all.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
0 Comments
oldest
newest
Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...