home *** CD-ROM | disk | FTP | other *** search
- // Windows Media Player - Copyright 2000 Microsoft Corporation.
-
- function InitEQ()
- {
- UpdateEQOnOff();
- }
-
- function UpdateEQOnOff()
- {
- if (eq.bypass == true)
- {
- eqOnOffLabel.value="res://wmploc.dll/RT_STRING/#1851";
- }
- else
- {
- eqOnOffLabel.value="res://wmploc.dll/RT_STRING/#1846";
- }
- }
-
- function InitSRS()
- {
- UpdateSRSOnOff();
- }
-
- function UpdateSRSOnOff()
- {
-
- if (eq.enhancedAudio == true)
- {
- srsOnOffLabel.value="res://wmploc.dll/RT_STRING/#1846";
- }
- else
- {
- srsOnOffLabel.value="res://wmploc.dll/RT_STRING/#1851";
- }
-
- }
-
- function NextSpeakerSize()
- {
- var index = eq.speakerSize;
-
- index++;
- if (index > 2)
- index = 0;
-
- eq.speakerSize = index;
- }
-
- function ResetVideoSettings()
- {
- vs.brightness=0;
- vs.contrast=0;
- vs.hue=0;
- vs.saturation=0;
- }
-
- function InitMetaDataDisplay()
- {
- var MediaInfoURL;
-
- if(player.isOnline)
- {
- if(player.OpenState == osMediaOpen)
- {
- MediaInfoURL = mediacenter.getNamedString("NPMetaDataURL_ONLINE");
- var TOC = player.currentMedia.GetItemInfo("TOC");
- if(TOC)
- {
- MediaInfoURL = MediaInfoURL + TOC;
- }
- }
- else
- {
- MediaInfoURL = "about:<body bgcolor=black scroll=no>";
- }
- }
- else
- {
- MediaInfoURL = mediacenter.getNamedString("NPMetaDataURL_OFFLINE");
- }
-
- IE1.Navigate(MediaInfoURL,0,0,0,0);
- }
-
- function CaptionsView_OnOpenStateChangeEvent()
- {
- switch (player.OpenState)
- {
- case osMediaChanging:
- ClearSamiDisplay();
- break;
- }
- }
-
- function MetaDataView_OnOpenStateChangeEvent()
- {
- switch (player.OpenState)
- {
- case osMediaOpen:
- InitMetaDataDisplay();
- break;
- }
- }
-
- function SwitchView(viewID)
- {
- mediacenter.settingsView = viewID; // tell media center about the change
- theme.CurrentViewID = viewID; // switch to this view
- }
-
- function InitSamiDisplay()
- {
- var URL = "res://wmploc.dll/SamiCaptioning.htm";
- IE1.Navigate(URL,0,0,0,0);
- player.closedCaption.captioningId = "SAMItext";
- }
-
- function ClearSamiDisplay()
- {
- handleScriptCommand("Text", "");
- }
-
- function handleScriptCommand(scType, Param)
- {
- var Document = 0;
- var ElemCollection = 0;
- var Element = 0;
- scType = scType.toUpperCase();
-
- if(scType == "TEXT" || scType == "<SYNC" || scType == "CAPTION")
- {
- // get the HTML document
- Document = IE1.Document;
- if(Document)
- {
- // get the element collection
- ElemCollection = Document.all;
- if(ElemCollection)
- {
- // get the first element with this name
- Element = ElemCollection.item("SAMItext",0);
- }
- if(Element == 0)
- {
- // operate on the body
- Element = Document.body;
- }
- if(Element)
- {
- // set the element HTML to our
- Element.innerHTML = Param;
- }
- }
- }
- }
-