home *** CD-ROM | disk | FTP | other *** search
- // All WMP Play and Open states are defined in skins\common\WMPStates.js
-
- function InitVisualizations()
- {
- InitMe();
- }
-
- function CloseVisualizations()
- {
- }
-
- function OnDownloadingMedia()
- {
- AddBanner.image="WMPImage_AdBanner";
- }
-
- function OnBannerClick()
- {
- var strTargetURL = player.currentmedia.getItemInfo("#BannerInfoURL");
- if ( strTargetURL != "")
- {
- player.launchURL(strTargetURL);
- }
- }
-
- function OnBannerMouseOver()
- {
- if ( player.currentmedia.getItemInfo("#BannerInfoURL") != "")
- {
- AddBanner.cursor = "hand";
- }
- else
- {
- AddBanner.cursor = "system";
- }
- }
-
- function VizPrev()
- {
- myeffect.previous()
- var nPreset = myeffect.currentPreset;
- mediacenter.effectType = myeffect.currentEffectType;
- mediacenter.effectPreset = nPreset;
- }
-
- function VizNext()
- {
- myeffect.next()
- var nPreset = myeffect.currentPreset;
- mediacenter.effectType = myeffect.currentEffectType;
- mediacenter.effectPreset = nPreset;
- }
-
- function InitMe()
- {
- SetMetaData();
-
- if (player.OpenState == osMediaOpen)
- {
- if (player.currentmedia.getItemInfo("#BannerURL") != "")
- {
- ShowBanner(true);
- }
- else
- {
- ShowBanner(false);
- }
-
- if(player.currentMedia.ImageSourceWidth > 0)
- {
- ShowVisualizations(false);
- video1.visible=true;
- }
- else
- {
- ShowVisualizations(true);
- video1.visible=false;
- }
- }
- else
- {
- ShowVisualizations(false);
- video1.visible=false;
- }
- }
-
- function ShowVisualizations(state)
- {
- myeffect.visible=state;
- svEffectsControls.visible=state;
- Titles.visible=state;
- }
-
- function myOnVideoStart()
- {
- video1.visible=true;
- ShowVisualizations(false);
- }
-
- function myOnVideoEnd()
- {
- video1.visible=false;
- ShowVisualizations(true);
- }
-
- function OnTimerTick()
- {
- SetMetaData();
- }
-
- function SetMetaData()
- {
- if (player.OpenState == osMediaOpen)
- {
- playlistname.value = player.currentmedia.getiteminfo("Author");
- trackname.value = player.currentmedia.name;
- }
- }
-
- function OnPlayStateChange()
- {
- InitMe();
- }
-
- function OnOpenStateChange()
- {
- switch (player.OpenState)
- {
- case osUndefined:
- break;
- case osMediaOpen:
- InitMe();
- break;
- case osMediaOpening:
- break;
- case osPlaylistLoading:
- InitMe();
- break;
- }
- }
-
- function ShowBanner(state)
- {
- if (state != svBanner.visible)
- {
- svBanner.visible = state;
-
- if (state == true)
- {
- svBanner.visible = true;
- svScreen.height -= svBanner.height;
- }
- else
- {
- svBanner.visible = false;
- svScreen.height += svBanner.height;
- }
- }
- }
-
- function ChangeFrameRate()
- {
- var s = myeffect.updatesPerSec + 6;
- if (s > 30)
- {
- s = 6;
- }
- fps.value = s + " fps";
- myeffect.updatesPerSec = s;
- }