Home  >  Article  >  Web Front-end  >  How to prevent the HTML5 video tag from automatically full screen in iPhone

How to prevent the HTML5 video tag from automatically full screen in iPhone

一个新手
一个新手Original
2017-10-09 10:23:462695browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn