4

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?

Nazar Osyp
  • 53
  • 1
  • 1
  • 6
  • 1
    Does 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 Answers1

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