Html5 video, html5

Source: Internet
Author: User

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

Related Article

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.