Embedding audio streams to blogs or websites mainly entertainment websites are became popular. The audio player provides better experience to the users.
Add audio player to webpage
HTML5 provides us audio element , we can add a music player to our webpage without using any third-party plug-in.
The controls attribute adds audio controls , like play, pause, and volume in the payer of the web page.
The source attribute is used to get source file for the player
Example of audio payer for web page
<title>Add music player to web page</title>
<source src=”myadioclip.ogg” type=”audio/ogg”>
<source src=”myadioclip.mp3″ type=”audio/mpeg”>
Your browser does not support the audio element.
We can also use third party plugin for audio player.
Following are the some of them
1) XSPF web Music Player(Flash) :
It is written in action script2, it has little bit browser compatibility issue. It has no customization panel aslo.
2) Audio Player 2.0 :
It is a lightweight simple and clean audio player plugin for wordPress site. There is an admin panel, we can customize
color and transparency to adjust color scheme with the website.
3) Mp3 Player :
It is simple eye catching audio player with fully customizable feature. It is open source
4) Media box :
it is a Jquery plugin for audio and video for web page. It supports near about all formats of audio or different formats of audio. It has a strange feature fristly it loads for
HTML5 if any thing wrong it turns into flash version. It supports old browsers also.
5) MusicBox :
It is a HTML5 Music player for web page. It supports old browser also. It has flash version. It
turns into flash version when require. It supports list view of audio file, we can customize by
external style sheet.
<html> <body> <audio controls> <source src="audioplayer.ogg" type="audio/ogg"> <source src="audioplayer.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> </body> </html>