11.39. HTML5 Audio

发布时间 : 2025-10-25 13:33:14 UTC      

Page Views: 17 views

HTML5 provides a standard for playing audio files.

11.39.1. Audio on the Internet

Until now, there is still no standard for playing audio on the web.

Today, most audio is played through plug-ins such as Flash. However, not all browsers have the same plug-in.

HTML5 specifies the standard for embedding audio elements on web pages, even with the < audio > element.

11.39.2. Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Internet Explorer 9, Firefox, Opera, Chrome, and Safari all support

Note: Internet Explorer 8 and earlier IE versions do not support

11.39.3. HTML5 Audio-how to work

To play audio in HTML5, you need to use the following code:

Example

<audiocontrols><sourcesrc="horse.ogg"type="audio/ogg"> <sourcesrc="horse.mp3"type="audio/mpeg">Your browser does not support audio element.audio>    

control Property for adding playback, pause, and volume controls.

In

11.39.4. Audio format and browser support

Currently, the audio element supports three audio format files: MP3, Wav, and Ogg:

browser

MP3

Wav

Ogg

Internet Explorer 9 +

YES

NO

NO

Chrome 6 +

YES

YES

YES

Firefox 3.6 +

YES

YES

YES

Safari 5 +

YES

YES

NO

Opera 10 +

YES

YES

YES

11.39.5. MIME type of audio format

Format

MIME-type

MP3

Audio/mpeg

Ogg

Audio/ogg

Wav

Audio/wav

11.39.6. HTML5 Audio tag

Label

Description

< audio >

Defines the sound content

Defined multimedia resources, which can be multiple and used in

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。