iOS support for H5 video playback

Source: Internet
Author: User

I. Requirements for video formats:

HTML5 does not specify which video format the browser should play. Browser vendors can choose the supported formats themselves. Several video encoding formats on the market: VP3, Theora, VP8, H. Both Theora and VP8 were developed on the basis of VP3, and Apple was using the video encoding format of H. The advantages of the encoded video file, the volume is small, the image quality is also good; Apple and Microsoft, each with a few patents, so the Safari browser only supports the video in the encoded format of H.

Two. Changes to the video tag

1.Safari Use full-screen video to optimize video demonstrations on smaller screens on iphone or ipod touch-a video control appears when you touch the screen, so setting the video's width is only valid on the page, and will call the Apple's own control component when playing full screen But the video on a big-screen device can be nested on the page to play

2. For the purpose of traffic loss, Apple prohibits the playback action triggered by non-user input, which means that the video tag addition preload and the attribute are invalid, and the autoplay JS and the method can not be used play() load() to play and load the video, unless the user manually triggered

3. Because the video metadata is not known before the video is loaded, if no height or width is specified, the default height and width of x 300 is assigned on the device running iOS

Add: video encoding means the way to convert a video format file into another video format file through a specific compression technique

iOS support for H5 video playback

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.