Stop videos from autostart in HTML

Viewed 108

I'm working on Django where I need to show more than one video in one page. Can anyone help me to stop autostart on my videos in iframe.

<div class="embed-responsive embed-responsive-16by9">
    <iframe class="embed-responsive-item" width="1280" height="720" src="/static/assets/img/examples/vi.mp4?&autoPlay=0" frameborder="0" &autoPlay="false"></iframe>
</div>
3 Answers

Remove the autoplay attribute since the browser will play it as soon as it sees it.

Instead of using autoPlay="false" attribute use autostart = "false"

like this:-

<source src="html/video.mp4" type="video/mp4" autostart="false">

If you don't want your video to autoplay , then you can use autoplay=0 insted of autoplay=false

Related