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.
Tags
Need help implementing this?
We turn these playbooks into shipped features. Let us scope your roadmap and support your team.
Start a project conversation