Sometimes, we want to avoid the native fullscreen video player with HTML5 on iPhone or Android.
In this article, we’ll look at how to avoid the native fullscreen video player with HTML5 on iPhone or Android.
How to avoid the native fullscreen video player with HTML5 on iPhone or Android?
To avoid the native fullscreen video player with HTML5 on iPhone or Android, we add the playsinline
attribute.
For instance, we write
<video src="file.mp4" playsinline></video>
to add the playsinline
attribute to the video element to stop it from showing full screen on mobile.
Conclusion
To avoid the native fullscreen video player with HTML5 on iPhone or Android, we add the playsinline
attribute.