PDA

View Full Version : Getting Album Art to display in an embedded media player



robleslie
03-18-2007, 05:23 PM
Hi,

this is my situation. I have javascript with plays random mp3 files in an embedded media player. I want to display album art in the media player whilst continuing to allow the randomness of the mp3 files playing. Website is www.debbieleslie.co.uk

Here is the code I'm using to play random mp3 files

<script language="javascript">
var list = new Array;
list[0] = "25.mp3";
list[1] = "26.mp3";
list[2] = "27.mp3";
list[3] = "28.mp3";
list[4] = "29.mp3";
list[5] = "30.mp3";
var choice = Math.floor(Math.random() * 5);
document.write("<embed src='http://foreverinbluejeans.co.uk/"+list[choice]+"' autostart='yes'>");
</script>

You can see that the mp3 files are held on my other website. This has presented no problems in playing at all. I have embedded the album art in the mp3 file using media monkey.

Anyone got any ideas / suggestions please

many thanks

Rob

jscheuer1
03-18-2007, 07:38 PM
Your question implies that if the mp3 files were on the same web site as your page that somehow this would make the media monkey art appear. If that is not the case though (and this should be determined if you haven't done so already), the problem is more basic.

From what little I know about album art and mp3 files, they are two separate files. Most likely, media monkey is simply creating a local association between the two for your local viewing and listening pleasure. This may be able to be done on the web but, even if it is possible, it would only apply to media monkey players that were either so configured or that had the associations stored in a playlist. And, I doubt that this would translate to other players.

It gets more complex though, if an mp3 file is recognised as being from a particular album and the player is so configured, it may be able to fetch the album art from certain places on the web that are dedicated to providing this type of content service regardless of anything else that is or is not done.

robleslie
03-19-2007, 12:30 PM
I understand what you're saying about the media monkey file association and I guess thats true, however the media art still displays if I play the mp3 on my desktop using windows media player. I have edited the media art using media monkey so that when the file is played on my desktop windows media player, the picture displays as normal album art would. The default player on the website, which I'm guessing is created as part of the javascript, only shows a control bar (ie stop/start/pause/slider etc) It does not display the other parts of the media player. My guess is that if I can configure the player in a different way, it may show the album art.

jscheuer1
03-19-2007, 01:08 PM
Well, now your question is, I would think, about coding the object tag for media player. I'm none too familiar with that but, are you using this param:


<param name="ShowDisplay" value="1">

?

There may be another that is required for album art or, it may not be possible over the web. Also, you may need to upload the art and make sure its path on the server is accurately reflected in the playlist and/or by some other pointer.

robleslie
03-19-2007, 02:56 PM
Well no I'm not using that parameter although I have now tried it (both within the javascript and outside the script) and it's a no go.

The artwork is uploaded (to both sites just to make sure, lol)

I've looked again at the javascript and I don't see where it sets any parameters for the media player to display. My guess is that there must be a script somewhere that will tie in with the javascript and embed a full version of media player to the webpage?


Thanks

Rob