Recently made a mobile-end micro-mail page project, in the micro-letter page has video playback, but the need to prohibit the automatic full screen of iOS playback (the premise must be the use of videos tags).
Such as:
Copy Code code as follows:
<video id= "Post" AutoPlay loop preload= "Auto" >
<source src= "Foo.mp4" type= "Video/mp4" >
</video>
The iphone Safari Click Video will eject the player for full screen playback.
Look at the answers from others on the Internet, citing the following:
You can add a "webkit-playsinline" attribute to the video label, as follows:
Copy Code code as follows:
<video id= "video" width= "280" height= "140" Webkit-playsinline ></video>
I mean, is that going to solve the problem? The answer is, of course, not ....
Of course in the iOS app using Web video, it is possible to disable full screen playback, the following methods:
The front end adds the video tag to the attribute webkit-playsinline, such as:
Copy Code code as follows:
<video id= "Player" width= "height=" webkit-playsinline>
Obj-c, add the configuration:
Copy Code code as follows:
Webview.allowsinlinemediaplayback = YES
There are netizens to answer this answer:
The video transcoding, using AJAX to segment the request data to populate the canvas.
Of course, if you really need to exit the Full-screen, you can use this method, but after all, it's not necessary.
So the final conclusion is: There is no way to ban the IPhone Safari video label videos automatically full-screen.