home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September (Special)
/
Chip-Special_2002-09_Digitalni-Video.bin
/
servis
/
wm9
/
mpsetupXP.exe
/
RCDATA
/
CABINET
/
wmpdxm.wmz
/
wmpdxm.js
< prev
next >
Wrap
Text File
|
2002-08-15
|
6KB
|
184 lines
var g_kTrackerHeight = 19;
var g_kControlsHeight= 26;
var g_kGotoBarHeight = 29;
var g_kDisplayHeight = 74;
var g_kStatusHeight = 24;
var g_kCaptioningHeight = 89;
var g_kTotalHeight = g_kTrackerHeight+g_kControlsHeight+g_kGotoBarHeight+g_kDisplayHeight+g_kStatusHeight+g_kCaptioningHeight;
var g_Values = new Array();
var g_kUpdateSpeed = 333;
var g_nUpdate = 0;
var g_kMetadataMultiplier = Math.round(4000 / g_kUpdateSpeed);
function PropWrapper(prop,height)
{
this.prop = prop;
this.height = height;
}
g_Values["ShowPositionControls"]= new PropWrapper (wmpdxm.ShowPositionControls, 0);
g_Values["ShowTracker"] = new PropWrapper (wmpdxm.ShowTracker, g_kTrackerHeight);
g_Values["EnableTracker"] = new PropWrapper (wmpdxm.EnableTracker, 0);
g_Values["ShowControls"] = new PropWrapper (wmpdxm.ShowControls, g_kControlsHeight);
g_Values["ShowGotoBar"] = new PropWrapper (wmpdxm.ShowGotoBar, g_kGotoBarHeight);
g_Values["ShowDisplay"] = new PropWrapper (wmpdxm.ShowDisplay, g_kDisplayHeight);
g_Values["ShowStatusBar"] = new PropWrapper (wmpdxm.ShowStatusBar, g_kStatusHeight);
g_Values["ShowAudioControls"] = new PropWrapper (wmpdxm.ShowAudioControls, 0);
g_Values["ShowCaptioning"] = new PropWrapper (wmpdxm.ShowCaptioning, g_kCaptioningHeight);
function UpdateValues()
{
var fChange = false;
var HeightDelta = 0;
for (var prop in g_Values)
{
var val = eval("wmpdxm."+prop);
if (g_Values[prop].prop != val)
{
fChange=true;
g_Values[prop].prop = val;
HeightDelta += val ? g_Values[prop].height : -g_Values[prop].height;
}
}
if (fChange)
{
view.height+=HeightDelta;
UpdateUI(wmpdxm);
}
}
function Init()
{
UpdateUI(wmpdxm);
OnOpenStateChangeTransport(player.openState);
OnPlayStateChangeTransport(player.playState);
OnStatusChangeTransport(player.status);
OnWMPDXMOpenStateChange(player.openState);
}
var g_kMinVolumeWidth_NoPositionControls = 91;
var g_kMinVolumeWidth_PositionControls = 222;
function DetermineAudioVisible()
{
if (!wmpdxm.ShowAudioControls) return false;
if (wmpdxm.ShowPositionControls)
{
return (view.width >= g_kMinVolumeWidth_PositionControls);
}
else
{
return (view.width >= g_kMinVolumeWidth_NoPositionControls);
}
}
function CalculateAudioLeft()
{
if (PositionControls.visible)
{
return Math.max (PositionControls.left + PositionControls.width + 1, view.width-AudioControls.width);
}
else
{
return Math.max (TransportControls.width + 1, view.width-AudioControls.width);
}
}
function UpdateUI()
{
Tracker.visible = wmpdxm.ShowControls && wmpdxm.ShowTracker;
seek.enabled = wmpdxm.EnableTracker;
ControlsParent.visible = wmpdxm.ShowControls;
GotoBar.visible = wmpdxm.ShowGotoBar;
Display.visible = wmpdxm.ShowDisplay;
Status.visible = wmpdxm.ShowStatusBar;
PositionControls.visible= wmpdxm.ShowPositionControls;
AudioControls.visible = DetermineAudioVisible();
AudioControls.left = CalculateAudioLeft();
Captioning.visible = wmpdxm.ShowCaptioning;
AllControls.visible = false;
AllControls.height = g_kTotalHeight;
var accumulatedHeight = 0;
if (Captioning.visible) accumulatedHeight += g_kCaptioningHeight;
Tracker.top = accumulatedHeight;
if (Tracker.visible) accumulatedHeight += g_kTrackerHeight;
ControlsParent.top = accumulatedHeight;
if (ControlsParent.visible) accumulatedHeight += g_kControlsHeight;
GotoBar.top = accumulatedHeight;
if (GotoBar.visible) accumulatedHeight += g_kGotoBarHeight;
Display.top = accumulatedHeight;
if (Display.visible) accumulatedHeight += g_kDisplayHeight;
Status.top = accumulatedHeight;
if (Status.visible) accumulatedHeight += g_kStatusHeight;
AllControls.height=accumulatedHeight;
VideoSubview.height = Math.max( 0, (view.height-accumulatedHeight));
AllControls.top = (view.height-accumulatedHeight);
AllControls.visible=true;
}
function OnWMPDXMOpenStateChange(NewState)
{
if (NewState==osMediaOpen)
{
UpdateDisplay();
}
}
function UpdateDisplay()
{
show.value=player.currentPlaylist.name;
title.value=player.currentMedia.getItemInfo("Title");
author.value=player.currentMedia.getItemInfo("Author");
copyright.value=player.currentMedia.getItemInfo("Copyright");
}
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
if (theme.loadPreference("debug")=="RockOn")
{
freak();
var f=0;
}
else
{
theme.savePreference("debug","Not Rocking Onward");
}
function PlayButtonClick(event)
{
if( (player.playState==psPaused) && (event.ctrlKey) && player.controls.isAvailable('step') )
{
if (event.shiftKey)
{
player.controls.step(-1);
}
else
{
player.controls.step(1);
}
}
else
{
g_SetPlayPauseFocus=true;
player.controls.play();
}
}
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!
//BUGBUGBUG -- DEBUG DEBUG DEBUG REMOVE REMOVE REMOVE !!!!!