PHP tutorials,a way to getting some thing new in web

Followers

Powered by Blogger.

Sunday 14 September 2014

Display Audio File On HTML5 page

No comments :
Today I am going to cover small but very useful topic of HTML5. In previous I explained you how to upload audio file in database using php.



Today we will see how to show audio file in our webpage with html <audio> tag.

<audio> tag is useful to stream audio mp3,wave,ogg files using html5. <audio> tag works fine with IE,Chrome,Safari,Mozilla Firefox.This tag supports 3 files i.e. mp3,wave,ogg.



Put following code with audio file path in html5 page.

<audio controls="controls">
<source src="ring.mp3" type="audio/mpeg">
</audio>

In above code,"controls" will show controls of audio."autoplay" will play audio at loading of page.

No comments :

Post a Comment