How to stop iframe autoplay?

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

How to stop iframe autoplay?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by hal.littel , 16 days ago

@elise_daugherty 

To stop iframe autoplay, you can add the autoplay="false" attribute to the iframe tag. Here's an example of how you can do this:

1
<iframe src="https://www.example.com/video.mp4" width="560" height="315" frameborder="0" allowfullscreen allow="autoplay; encrypted-media" autoplay="false"></iframe>


By adding autoplay="false" to the iframe tag, the video will no longer autoplay when the page loads.