Sometimes, we want to enable HTML5 Video autoplay on iPhone.
In this article, we’ll look at how to enable HTML5 Video autoplay on iPhone.
How to enable HTML5 Video autoplay on iPhone?
To enable HTML5 Video autoplay on iPhone, we add the playsinline
attribute.
For instance, we write
<video autoplay loop muted playsinline class="video-background">
<source src="videos/intro-video3.mp4" type="video/mp4" />
</video>
to add the playsinline
attribute to the video element to make it play automatically.
Conclusion
To enable HTML5 Video autoplay on iPhone, we add the playsinline
attribute.