Play Audio in HTML5

0
19

Image

 

Imaging you got a browser that support html5 (chrome,firefox,opera etc). its easy to play an mp3 file with ur browser

Steps

1. Save mp3 file in a folder ( say audio.mp3)

now create an html file with following code, save in same directory

 

<audio controls=”audio1″>
<source src=”audio.mp3″ type=”audio/mpeg” />
</audio>

Open the html file in chrome

done

LEAVE A REPLY

Please enter your comment!
Please enter your name here