HTML5 structure and semantics (5): embedded media

Source: Internet
Author: User

Comments: Videos are already widely used on the Web, but their formats are almost proprietary. Flash for YouTube and Windows Media for Microsoft®, Apple uses QuickTime. The tag used to embed the content in one browser is invalid in another browser. Therefore, WhatWG proposes to introduce a new video element to embed arbitrary videos.
Videos have been widely used on the Web, but their formats are almost proprietary. Flash for YouTube and Windows Media for Microsoft®, Apple uses QuickTime. The tag used to embed the content in one browser is invalid in another browser. Therefore, WhatWG proposes to introduce a new video element to embed any video format. For example, you can use the following code to embed my QuickTime movie "a Sora in Prospect Park ":
<Video src = "http://www.cafeaulait.org/birds/sora.mov"/>
It is still controversial which format and decoder are used as the preferred choice. Ogg Theora may be strongly recommended or required. You can also optional support proprietary formats such as QuickTime and patented formats such as MPEG-4. The actual formats used are probably determined by the market, just like GIF, JPEG, and PNG formats (these formats overwhelm competitors such as BMP, X-Bitmap, and JPEG 2000 through market competition, become the preferred format for img elements ).
We also propose to introduce the audio element. For example, you can use the following code to add background music to a Web page:
<Audio src = "spacemusicloud" autoplay = "autoplay" loop = "20000"/>
The autoplay attribute indicates that the browser starts playing the video immediately after loading the page, without waiting for explicit user requests. The audio is played cyclically for 20,000 times and then stopped (or stopped when the user closes the window or switches to another page ). Of course, the browser can (and should) allow users to close embedded media, instead of simply following the requirements of the page author.
The browser must support WAV format and other formats such as MP3.
Because older browsers do not support these elements and they do not make sense for blind and deaf users, audio and video elements can contain additional tags to describe the audio and video content. This is also helpful for search engines. Ideally, these tags are the complete text version of the audio and video content. For example, code 8 shows John F. Kennedy's inaugural speech written in HTML 5.
<Audio src = "kendyinauguraladdrees.mp3">
<P>
Vice President Johnson, Mr. Speaker, Mr. Chief Justice,
President Eisenhower, Vice President Nixon, President Truman,
Reverend Clergy, fellow citizens:
</P>
<P>
We observe today not a victory of party, but a celebration
Freedom -- symbolizing an end, as well as a beginning --
Signifying renewal, as well as change. For I have sworn before
You and Almighty God the same solemn oath our forebears
Prescribed nearly a century and three-quarters ago.
</P>
<P>
The world is very different now. For man holds in his mortal
Hands the power to abolish all forms of human poverty and all
Forms of human life. And yet the same revolutionary beliefs
Which our forebears fought are still at issue around the globe --
The belief that the rights of man come not from
Generosity of the state, but from the hand of God.
</P>
<P>
...
</P>
</Audio>
(To be continued)

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.