In this article I will explain with an example, how to use HTML5 Audio Player in ASP.Net.
Audio Location
The Audio file is stored in a Files folder within the Website project.
HTML Markup
The following HTML Markup consists of an HTML5 Audio Player element.
The HTML5 Audio Player element has the following properties:
controls – It displays the control buttons such as Play Pause, Volume, etc. in the HTML5 Audio Player.
type – It specifies the media type i.e. MIME type of the media.
src – It is the URL of the Audio.
<audio controls="controls">
<source src="Files/Kalimba.mp3" type="audio/mpeg" />
</audio>
Screenshot
Browser Compatibility
The above code has been tested in the following browsers only in versions that support HTML5.
* All browser logos displayed above are property of their respective owners.
Demo
Downloads