First, play audio in the HTML5
Audio element
-The audio element can be embedded in an HTML page, and the attributes of the element can be set to be automatically played, preloaded, and looped back.
-The audio element provides play, pause, and volume controls to control
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/3D/wKiom1b6LpjQvCMiAABCaU0pHzY845.png "title=" Web.png "alt=" Wkiom1b6lpjqvcmiaabcau0phzy845.png "/>
-Use the audio element to provide files in three different formats: MP3, OGG, Wav
-MP3: Using MPEG Audio decoder
-OGG: Using OGG Audio decoder
-WAV: With WAV Audio decoder
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/39/wKioL1b6L8HQg5aIAAEjBqtlbkY161.png "title=" Web.png "alt=" Wkiol1b6l8hqg5aiaaejbqtlbky161.png "/>
-Grammatical structure
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/39/wKioL1b6L-2Sqgz6AAD0msw0fpI128.png "title=" Web.png "alt=" Wkiol1b6l-2sqgz6aad0msw0fpi128.png "/>
Audio properties
-The audio element supports the following properties
-src: Specifies the URL of the file to be played through <source>
-Controls: Can activate the default page provided by each browser
-AutoPlay: AutoPlay after loading audio
-Loop: When this property is set, the audio is played repeatedly
-Preload: Cache settings
Second, the programming realization Audio player
Reference: http://jasonteach.blog.51cto.com/5192112/1758040 programming for video player
Summary: This chapter mainly introduces the next HTML5 audio processing (playing audio in H5, programming to implement audio player)
This article from the "Technical Exchange" blog, declined reprint!
HTML5 Advanced -5 HTML5 audio processing (audio playback in H5, programming of audio players)