Rob DiNardo - Web Development Tips

Home › Blogs › Rob's blog

How to add an inline MP3 player on an HTML page

Rob — September 5, 2010 - 17:27

A while ago Martin Laine of 1PixelOut created a WordPress plugin that allows a cool MP3 player to be easily added to your blog post (if you are running WordPress). But what if you were not running WordPress and just wanted to add a player to a regular HTML file? Here is an example of what the 1PixelOut MP3 player looks and acts like (just click the play button).

Mindy McAdams has written a nice tutorial on how to do it. And this page shows you how to customize the color.

This is an example of the code you can use:

<script type="text/javascript" language="JavaScript" src="/sites/default/files/audio/audio-player.js"></script>

<object width="290" height="30" id="audio-player-1" data="/sites/default/files/audio/audio-player.swf" type="application/x-shockwave-flash">
<param value="/sites/default/files/audio/audio-player.swf" name="movie">
<param value="playerID=audio-player-1&loop=no&autostart=no&
soundFile=/sites/default/files/audio/audiotest.mp3" name="FlashVars">
<param value="high" name="quality">
<param value="false" name="menu">
<param value="transparent" name="wmode">
</object>

  • audio
  • flash
  • HTML
  • mp3
  • Rob's blog
  • Login to post comments

User login

  • Request new password

Code

  • WordPress Plugins