Ban iphone Safari video label videos automatically Full-screen method _ios

Source: Internet
Author: User

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.

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.