How to disable autoplay video in iframe?

by elise_daugherty , in category: HTML & CSS , 3 days ago

How to disable autoplay video in iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by darrion.kuhn , 2 days ago

@elise_daugherty 

To disable autoplay for a video in an iframe, you can add the "autoplay=0" parameter to the URL of the video. Here's an example:

1
<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID?autoplay=0" frameborder="0" allowfullscreen></iframe>


By adding "?autoplay=0" at the end of the video URL in the iframe code, it will prevent the video from autoplaying when the page loads. This solution works for most video platforms that use iframes, such as YouTube, Vimeo, and others.