Dynamic Web Lab
Back to insights

HTML5 Audio

March 4, 20131 min read

Previously we uses flash to play audio files.Now HTML5 support a new element called Audio.It will give web developer much controls to do funny stuffs with audio.No need to use flash any more!
[php]
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
<!– add your fallback solution here. Like you can add flash here for older browser–>
<p>Oh! Your browser does not support the HTML5 audio element.</p>
</audio>
[/php]

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the element.
For more detials about html5 audio you can visit this post Playing audio files with HTML5.

Writer

Dynamic Web Lab Editorial

We share how we design, engineer, and scale digital products across the GCC, Europe, and the US.

Share this article

Tags

HTML5

Need help implementing this?

We turn these playbooks into shipped features. Let us scope your roadmap and support your team.

Start a project conversation
HTML5 Audio - Demo Dynamic Web Lab