Compatible HTML5 video audio player (cross-browser supported)

Source: Internet
Author: User

Using Html5media.js to view HTML5 video and audio files on all browsers, it makes up for the low version IE browser does not support <video> and <audio> tags, only need to load html5media.js use < Video> and <audio> tags can play video and audio across browsers.
How to use it?
To make HTML5 's video and audio tags work on all browsers, you must include the following line of code inside the head of the page:

<script src= "//api.html5media.info/1.1.8/html5media.min.js" ></script>


You can then add a video using the following code:

<video src= "Video.mp4" width= "height=" "Controls preload></video>"
You can also add a section of audio using the following code:

<audio src= "Audio.mp3" Controls preload></audio>

Video label

Property Value Describe
AutoPlay true | False If true, the video plays immediately after it is ready.
Controls true | False If true, the control is displayed to the user, such as a play button.
Height Pixel Sets the height of the video player.
Loop true | False Play again when you are finished playing, that is, looping
Poster Url This property value is linked to an image when the video is not responding or the buffer is insufficient. The image will be displayed in a certain proportion
Src Url The URL of the video to play. Better with child elements <source> implementations.
Width Pixel Sets the width of the video player.

HTML5 browser and audio format compatibility

Audio format Chrome Firefox IE9 Opera Safari
OGG Support Support Support does not support does not support
MP3 Support does not support Support does not support Support
Wav does not support Support does not support Support does not support

, the appearance of different browser audio spaces is not the same.

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.