...

View Full Version : Mac Metadata in DIV Tag



tripwire
12-15-2006, 09:37 PM
I have a feeling this is another problem that may be hard to solve. I need to figure out how to get my windows media player asx playlist metadata to display on a Mac in my div tag.

Here's what I have which works on windows ie no problem, just not any mac. I've been testing it using safari.



function ShowMetadata()
{
var Media = MediaPlayer.currentMedia;
// Test whether we have a valid Media object.
if(!Media)
{
divMetadata.innerHTML = "No current media.";
return;
}

// Retrieve the metadata we want to display.
var Title = Media.getItemInfo("Title");
var Artist = Media.getItemInfo("author");
var AlbumTitle = Media.getItemInfo("AlbumTitle");
var Duration = Media.durationString;

var status = MediaPlayer.status;

// Test the duration string value.
// Streaming media always returns zero.
if(Duration == "00:00")
{
Duration = "No duration available";
}

// Display the metadata in the DIV element.
divMetadata.innerHTML = "Title: " + Title + "<BR>";
divMetadata.innerHTML += "Artist: " + Artist + "<BR>";
divMetadata.innerHTML += "Album: " + AlbumTitle + "<BR>";
divMetadata.innerHTML += "Duration: " + Duration + "<BR>";
divMetadata.innerHTML += "Status: " + status + "<BR>";
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum