Home >Web Front-end >HTML Tutorial >How to prevent the HTML5 video tag from automatically full screen in iPhone
Problem: When opening a video in an HTML5 page on an iPhone, the system player will be called by default and the video resource will be played in full screen.
Solution: 1. First, add webkit-playsinline=true in the video tag of the html5 page;
<video id="player" webkit-playsinline></video>2. If you are using Phonegap or Cordova; you can configure it in the config.xml configuration file:
webview.allowInlinesMediaPlayback = YES;Then in the video tag Add webkit-playsinline attribute.
The above is the detailed content of How to prevent the HTML5 video tag from automatically full screen in iPhone. For more information, please follow other related articles on the PHP Chinese website!