Recently made a mobile page project with video playback on the page, but you need to disable automatic full-screen playback of iOS (provided you must use the video tag).
Such as:
<id= "POST" AutoPlay loop preload= "Auto">< src = "foo.mp4" type = "Video/mp4" > </video>
Clicking on the video on the iphone safari will pop up the player for full screen playback.
On the internet to look at the answers given by others, quoted as follows:
可以在 video 标签上加一个 “webkit-playsinline” 属性 ,如下:
<id= "video" width= "280" height= " $" ></video>
I mean, is this going to solve the problem? The answer is of course not ....
Of course, the use of web video in the IOS APP , can prohibit full-screen playback, the method is as follows:
The front end adds video
tags webkit-playsinline
to attributes such as:
<id= "Player" width= "480" height= "320" webkit-playsinline>
Obj-c, add the configuration:
Webview.allowsinlinemediaplayback = YES
There are netizens to answer the answer:
Transcode the video and use Ajax to fragment 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 is not necessary.
So the final conclusion is: There is no way to disable IPhone Safari video tag videos automatically fullscreen.
How to disable iPhone Safari video tag videos automatically fullscreen?