javascript - how to embed mp3 file in web page -


i have set of mp3 files when page requested need randomly pick 1 file , should play background music in web page there cross browser way(need work major web browsers such ie,firefox,chrome) of doing this?

use jw player http://www.longtailvideo.com/players/jw-flv-player/ play mp3, please don't play music without user request. make user gtfo of website.

example: http://www.longtailvideo.com/support/jw-player-setup-wizard?example=202

<script type='text/javascript' src='swfobject.js'></script>  <div id='mediaspace'>this text replaced</div>  <script type='text/javascript'>   var = new swfobject('player.swf','mpl','470','24','9');   so.addparam('allowfullscreen','true');   so.addparam('allowscriptaccess','always');   so.addparam('wmode','opaque');   so.addvariable('duration','33');   so.addvariable('file','http://www.longtailvideo.com/jw/upload/bunny.mp3');   so.write('mediaspace'); </script> 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -