How to disable iPhone Safari video tag videos automatically fullscreen?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.