About HTML5 entry to proficiency: HTML5 Audio

Source: Internet
Author: User
Keywords HTML5 HTML5 audio Getting started to proficient

HTML 5 provides a standard for playing audio.

Audio on the Web

Until now, there is still no standard for playing audio on a Web page.

Today, most audio is played through Plug-ins (such as http://www.aliyun.com/zixun/aggregation/12592.html ">flash"). However, not all browsers have the same plug-ins.

HTML 5 provides a standard way to include audio through audio elements.

The audio element can play a sound file or an audio stream.

Audio format

Currently, the audio element supports three audio formats:

IE 9 Firefox 3.5 Opera 10.5 Chrome 3.0 Safari 3.0 Ogg vorbis√√√mp3√√√wav√√√

How to Work

If you want to play audio in HTML 5, all you need is:

<audio src= "Song.ogg" controls= "Controls" >
</audio>

Control property to add playback, pause, and volume controls.
The content inserted between <audio> and </audio> is displayed for browsers that do not support audio elements:

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.