Search in forum:

Author Message
Post06/13/2012 at 8:21pm (UTC)    
Post subject: HTML5 Background Audio Player

HTML5 Background Audio Player

Author: Dynamic Drive

Description: HTML5 background audio player lets you play "soothing" background music on your pages with a simple user interface to control basic tasks such as stopping or lowering its volume. Unlike a regular audio player, it can remember the player's current point in the music playback, volume, and whether it's paused, so as the user transitions from page to page, the music continues where it last left off with minimal disruptions.

HTML5 audio (the <audio> element) is supported in IE9+, FF3.5+, Chrome/Safari 3+, and Opera 10.5+. The player automatically hides the player UI in browsers that don't support it.

<link href="" rel="stylesheet" type="text/css" />

<script type="text/javascript" src=""></script>

<script src="">

* HTML5 background audio player (c) Dynamic Drive (
* This notice MUST stay intact for legal use
* Visit for this script and 100s more.


<!--Define audio tag with source elements pointing to audio file (and fallback files)-->

<audio id="mybgplayer">
<source src="" type="audio/mpeg">

<!--Define corresponding audio interface. Certain CSS classes trigger changes to them-->

<div id="mybgplayerui" class="bgplayerui">
<img class="play" src="" data-pausesrc="" /> <img class="rewind" src="" style="position:relative; left:-4px" /> <div class="volume"></div>



var playerinstance=bgaudioplayer({
audioid: 'mybgplayer', // id of audio element
audiointerface: 'mybgplayerui', // id of corresponding UI div
autoplay: true, // auto play music?
persistTimeLine: true, // Persist player's current timeline/ volume when moving from page to page?
volume: 0.1, // Default volume (0.0 to 1.0)
volumelevels: 15 // # of volume bars to show in UI


Playing music's url is emphasized in RED. You can change it with your own music url.

Music must be uploaded as mp3, ogg, wav, or mp4.

If you have a problem, pls write here!

Have a nice time!
- If you love your own-free-website, fight against to spams and spammers! Please support us, let's remove all the spammers together! We don't want to see spams and spammers on OFW board!

- The only language of the board is English / Englisch / Anglaise / Ingl├ęs / Inglese / İngilizce / Angielski / Английский / Αγγλικά / 英语 / 英语简体英文. So please write in just English!

Display posts from previous:   

Powered by phpBB © 2001, 2005 phpBB Group