Html5 video, html5
First, briefly describe the video Tag:
Video: embed the video into the page
1. Declare the video tag
Use src for a single video:
<video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls> Your browser does not support the <code>video</code> element.</video>
Use the <source> label for multiple videos:
<video controls> <source src="SampleVideo.ogv" type="video/ogv"> <source src="SampleVideo.mp4" type="video/mp4"> Your browser does not support the <code>video</code> element.</video>
The browser will first identify whether Ogg format files are supported, if not, read the MPEG-4 file. You can also specify the encoding format as follows:
<video controls> <source src="SampleVideo.ogv" type="video/ogv; codecs=dirac, speex"> Your browser does not support the <code>video</code> element.</video>
2. Video Format
For the formats supported by different browsers, see Media formats supported by the audio and video elements:
<! DOCTYPE html>
Create a page and run the code. You can see that the HTML5-supported browser can play the video.
2. Video for Everybody: compatible with video problems in various browsers, and some suggestions on Video compression formats
3. mediaelementjs: Recommended Patch
4. vid. ly: Online conversion of video websites (only one video can be converted for free)
4. online-convert: online conversion of video websites
References:
1. MDN: HTMLVideoElement
2. MDN: Using HTML5 audio and video
3. MDN: <video>
4. html5please