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.