Skip to main content

yahoo player

I ditched the wordpress flash player. Not that isn't any good, in fact it is excellent but I don't want to engage my very few readers in a browser war (yes, IE again). I now use the yahoo media player.

The upside for me is that the yahoo player is a delight to use, just load the script in the header of your page. Then link to your mp3 files, the script will find the links and play them when you click the link or the play button it provides beside the link.

step 1

In the header:

<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>

step 2

Provide mp3 as a link:

<a href="path/to/your/file" >some-title</a>

customizing

Yahoo provides an API for the player which you can use to tailor the behaviour of the player.
In my case I wanted to turn off the auto advance function, also I dont't like the default 'cover art'.

As it happens you can change all of that, just set some variables like this:

<script type="text/javascript">
var YMPParams =
{
autoplay:false,
autoadvance:false,
volume:0.5,
defaultalbumart:'http://somedomain.com/path/someimage.gif'
}
</script>

I tried to place that in the header but blogger doesn't like the quotes. I use a html/javascript widget in the footer where I put some jquery stuff so I put it there instead.

cover art

Associating some cover art with a file is easy, add an img tag to the link and hide it:

<a href="some.mp3" ><img src="some cover art" style="display:none;" />title</a>

blogger note

You can not upload mp3 files to blogger or picasa. I use the free web space from my provider to host the files. As an alternative you can make a movie with the picasa client and upload that to blogger. In this case you don't need a player of coarse.

Thanks Yahoo!
yahoo page
o'reilly
YMP API

Comments