home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 79
/
MINAMI79.iso
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
256
/
BUGGER.JS
< prev
next >
Wrap
Text File
|
2002-12-14
|
2KB
|
91 lines
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//
//
// vwPlayer
//
//
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//
// vwPlayer_UpdateMetadata
//
function vwPlayer_UpdateMetadata()
{
var sz1;
var sz2;
var sz3;
if (player.openState == 13)
{
//
// Figure out the text for the top line:
//
var currMedia = player.currentMedia;
sz1 = currMedia.name;
if (sz1 == "")
{
sz1 = currMedia.getItemInfo('Title');
}
if (sz1 == "")
{
sz1 = currMedia.sourceURL;
}
//
// Figure out the text for the middle line:
//
sz2 = currMedia.getItemInfo('Author');
if (sz2 == "")
{
sz2 = currMedia.getItemInfo('Copyright');
}
//
// Figure out the text for the last line:
//
sz3 = currMedia.getItemInfo('Album');
if (sz3 == "")
{
sz3 = currMedia.getItemInfo('Band');
}
if (sz3 == "")
{
var bitrateString = theme.loadString("res://wmploc/RT_STRING/#2066");
var kbps = Math.floor(player.network.bitrate / 1000);
if (kbps==0)
{
sz3 = "";
}
else
{
sz3 = sz3.sprintf(bitrateString, kbps.toFixed(0));
}
}
}
txt1.value = sz1;
txt2.value = sz2;
txt3.value = sz3;
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//
// vwPlayer_OnLoad
//
function vwPlayer_OnLoad()
{
vwPlayer_UpdateMetadata();
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//
// vwPlayer_OnOpenStateChange
//
function vwPlayer_OnOpenStateChange(NewState)
{
vwPlayer_UpdateMetadata();
}