I'm developing simple web application with video on one of the pages, but I don't want this video to open fullscreen mode on mobile devices. I've tried to disable controls, but it still not works on mobiles. Is there any option to do this?
Asked
Active
Viewed 1.1k times
4
-
1Does this answer your question? [Can I avoid the native fullscreen video player with HTML5 on iPhone or android?](https://stackoverflow.com/questions/5054560/can-i-avoid-the-native-fullscreen-video-player-with-html5-on-iphone-or-android) – imvain2 Aug 28 '20 at 16:42
-
@imvain2 yeah. thank you – Nazar Osyp Sep 02 '20 at 09:02
1 Answers
15
Use this code for mobile browsers:
<video autoplay loop muted controls webkit-playsinline playsinline>
<source src="file.mp4" type="video/mp4">
</video>
Using webkit-playsinline
and playsinline
make Mobile browsers play the video right where it is instead of the default, which is to open it up full-screen while it plays.

gpl
- 1,380
- 2
- 8
- 24
-
1
-
1In Samsung native browser it will show video assistance control to make full screen in mobile. Even with playsinline. – Prabin Tp Sep 07 '21 at 10:09