home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 73
/
MINAMI73.iso
/
Extra
/
MPSetup.exe
/
1033
/
RCDATA
/
CABINET
/
wmploc.DLL
/
256
/
4013
< prev
next >
Wrap
Text File
|
2002-12-14
|
4KB
|
139 lines
// Windows Media Player - Copyright 2000 Microsoft Corporation.
//<script>
var g_tracktimeTextWidth=0;
var g_kNonCaptionsHeight = 100;
var g_kCaptionsHeight = g_kNonCaptionsHeight + mediacenter.captionsHeight;
var g_SetPlayPauseFocus=false;
function Init()
{
UpdateVizTitle();
LayoutMarquee();
OnOpenStateChange(player.openState);
OnOpenStateChangeTransport(player.openState);
OnPlayStateChangeTransport(player.playState);
ShowStatus(player.status);
if(player.dvd.isAvailable('dvd'))
{
UpdateDVDControls();
}
SyncFFWDButtonToRate(player.settings.rate);
}
function OnOpenStateChange(NewState)
{
if(NewState==osMediaOpen)
{
g_fCaptionsDetected=false;
txtVizTitle.visible=player.currentMedia.imageSourceHeight==0;
UpdateCaptions();
UpdateDVDControls();
}
}
function PreviousDisplay()
{
mediacenter.vizRequest = VR_PRESET_PREV;
}
function NextDisplay()
{
mediacenter.vizRequest = VR_PRESET_NEXT;
}
function LayoutMarquee()
{
g_tracktimeTextWidth = tracktime.textwidth;
var margin=parseInt(theme.loadString("res://wmploc/RT_STRING/#1272"));
tracktime.horizontalAlignment='left';
tracktime.left = svMarquee.width - tracktime.textwidth;
tracktime.horizontalAlignment='right';
try
{
metadata.width = svMarquee.width - tracktime.textwidth - margin - metadata.left;
}
catch(err){}
}
function dummybutton()
{
this.down = false;
}
//main app and fullscreen have new super ffwd buttons (ffwd_multi), but they need
//a dummy button to keep transport.js from freaking out
var ffwd = new dummybutton();
function UpdateVizTitle()
{
var viewName = helper.effectFriendlyName( mediacenter.effectType );
var presetName = helper.effectPresetName( mediacenter.effectType, mediacenter.effectPreset );
if (""!=presetName)
{
txtVizTitle.value = viewName + " : " + presetName;
}
else
{
txtVizTitle.value = viewName;
}
}
//=====================================================
// SAMI
//=====================================================
var g_fCaptionsDetected = mediacenter.showCaptions && helper.captionsAvailable;
function handleScriptCommand(scType, Param)
{
scType = scType.toUpperCase();
if(scType == "TEXT" || scType == "<SYNC" || scType == "CAPTION")
{
g_fCaptionsDetected = mediacenter.showCaptions;
}
}
function UpdateCaptions()
{
g_fCaptionsDetected = (mediacenter.showCaptions && helper.captionsAvailable && !PlayingDVD());
SetCaptions(g_fCaptionsDetected);
}
function SetCaptions(visible)
{
if (!visible) piCaptions.visible = false;
view.height = visible ? g_kCaptionsHeight : g_kNonCaptionsHeight;
if (visible) piCaptions.visible = true;
}
function GetViewHeight()
{
if (mediacenter.showCaptions && (g_fCaptionsDetected||helper.captionsAvailable) )
{
g_fCaptionsDetected=true;
return g_kCaptionsHeight;
}
return g_kNonCaptionsHeight;
}
function PlayingDVD()
{
return ( (player.currentPlaylist.count>0) && (player.currentPlaylist.item(0).sourceURL.indexOf("wmpdvd:")==0));
}
function UpdateDVDControls()
{
if (PlayingDVD())
{
txtVizTitle.visible = false;
btnDVDMenu.visible = ( ("videoManagerMenu" != player.dvd.domain) && ("videoTitleSetMenu" != player.dvd.domain) );
btnDVDResume.visible = !btnDVDMenu.visible;
}
}