home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September (Special) / Chip-Special_2002-09_Digitalni-Video.bin / servis / wm9 / mpsetupXP.exe / RCDATA / CABINET / wmploc.DLL / 256 / 4013 < prev    next >
Text File  |  2002-08-19  |  3KB  |  138 lines

  1. // Windows Media Player  - Copyright 2000 Microsoft Corporation.
  2. //<script>
  3.  
  4. var g_strPlayImage="";
  5. var g_strPlayHover="";
  6. var g_strPlayDown="";
  7. var g_strPauseHover="";
  8. var g_strPauseDown="";
  9.  
  10. var g_tracktimeTextWidth=0;
  11.  
  12. var g_SetPlayPauseFocus=false;
  13.  
  14. function OnOpenStateChange(NewState)
  15. {
  16.     if(NewState==osMediaOpen)
  17.     {
  18.         txtVizTitle.visible=player.currentMedia.imageSourceHeight==0;
  19.     }
  20. }
  21.  
  22. function PreviousDisplay()
  23. {
  24.     mediacenter.previousVizRequest = true;
  25. }
  26.  
  27. function NextDisplay()
  28. {
  29.     mediacenter.nextVizRequest = true;
  30. }
  31.  
  32. function LayoutMarquee()
  33. {
  34.     g_tracktimeTextWidth = tracktime.textwidth;
  35.  
  36.     var margin=parseInt(theme.loadString("res://wmploc/RT_STRING/#1272"));
  37.  
  38.     tracktime.horizontalAlignment='left'; 
  39.     tracktime.left = svMarquee.width - tracktime.textwidth;
  40.     tracktime.horizontalAlignment='right';
  41.  
  42.     try
  43.     {
  44.         metadata.width = svMarquee.width - tracktime.textwidth - margin - metadata.left;
  45.     }
  46.     catch(err){}
  47. }
  48.  
  49. function OnFFWD()
  50. {
  51.     if (player.PlayState == psScanForward)
  52.     {
  53.         player.controls.play();
  54.     }
  55.     else
  56.     {
  57.         player.controls.FastForward();
  58.     }
  59. }
  60.         
  61. function OnREW()
  62. {
  63.     if (player.PlayState == psScanReverse)
  64.     {
  65.         player.controls.play();
  66.     }
  67.     else
  68.     {
  69.         player.controls.FastReverse();
  70.     }
  71. }
  72.  
  73. function volumeOnChange()
  74. {
  75.     player.settings.mute=false;
  76. }
  77.  
  78. function muteOnClick()
  79. {
  80.     player.settings.mute = (player.settings.mute == true) ? false : true;
  81. }
  82.  
  83.  
  84. //=====================================================
  85. //  SAMI
  86. //=====================================================
  87.  
  88. function CaptionsView_OnOpenStateChangeEvent(NewState)
  89. {
  90.     switch (NewState)
  91.     {
  92.         case osMediaChanging:
  93.             ClearSamiDisplay();
  94.             break;
  95.     }
  96. }
  97.  
  98. function InitSamiDisplay()
  99. {
  100.     Browser1.loadSpecialPage("SAMI");
  101. }
  102.  
  103. function ClearSamiDisplay()
  104. {
  105.     handleScriptCommand("Text", "");
  106. }
  107.  
  108. function handleScriptCommand(scType, Param)
  109. {
  110.     var Document = 0;
  111.     var ElemCollection = 0;
  112.     var Element = 0;
  113.     scType = scType.toUpperCase();
  114.  
  115.     if(scType == "TEXT" ||  scType == "<SYNC" || scType == "CAPTION")
  116.     {
  117.         Browser1.showSAMIText(Param);
  118.     }
  119. }
  120.  
  121. function SetCaptions(visible)
  122. {
  123.     Browser1.height = visible ? 85 : 0;
  124. }
  125.  
  126. function UpdateVizTitle()
  127. {
  128.     var viewName = helper.effectFriendlyName( mediacenter.effectType );
  129.     var presetName = helper.effectPresetName( mediacenter.effectType, mediacenter.effectPreset );
  130.     if (""!=presetName)
  131.     {
  132.         txtVizTitle.value = viewName + " : " + presetName;
  133.     }
  134.     else
  135.     {
  136.         txtVizTitle.value = viewName;
  137.     }
  138. }