Skip to content Skip to sidebar Skip to footer

How To Embed Mp3 File In Web Page

I have set of mp3 files that when page is requested need to randomly pick up one file and should play as background music in my web page is there a cross browser way(need to work m

Solution 1:

Use JW Player http://www.longtailvideo.com/players/jw-flv-player/ to play MP3, but please don't play music without the user request. This will make the user to GTFO of your website.

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

<scripttype='text/javascript'src='swfobject.js'></script><divid='mediaspace'>This text will be replaced</div><scripttype='text/javascript'>var so = newSWFObject('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>

Post a Comment for "How To Embed Mp3 File In Web Page"