home *** CD-ROM | disk | FTP | other *** search
/ XMANGA 27 / XMANGA27.ISO / Extra / mp10setup.exe / wmploc.DLL / 256 / 4011 < prev    next >
Encoding:
Text (UTF-16)  |  2004-08-11  |  2.6 KB  |  65 lines

  1. function Init()
  2. {
  3.     OnOpenStateChange(player.openState); 
  4.     UpdateVizTitle(); 
  5.     if(player.dvd.isAvailable('dvd'))
  6.     {
  7.         UpdateDVDControls();
  8.     }
  9. }
  10.  
  11. function OnOpenStateChange(NewState)
  12. {
  13.     if(NewState==osMediaOpen)
  14.     {
  15.         txtVizTitle.visible=player.currentMedia.imageSourceHeight==0;
  16.         UpdateDVDControls();
  17.     }
  18. }
  19.  
  20. function PreviousDisplay()
  21. {
  22.     mediacenter.vizRequest = VR_PRESET_PREV;
  23. }
  24.  
  25. function NextDisplay()
  26. {
  27.     mediacenter.vizRequest = VR_PRESET_NEXT;
  28. }
  29.  
  30.  
  31. function UpdateVizTitle()
  32. {
  33.     try
  34.     {
  35.         var viewName = helper.effectFriendlyName( mediacenter.effectType );
  36.         var presetName = helper.effectPresetName( mediacenter.effectType, mediacenter.effectPreset );
  37.         if (""!=presetName)
  38.         {
  39.             txtVizTitle.value = viewName + " : " + presetName;
  40.         }
  41.         else
  42.         {
  43.             txtVizTitle.value = viewName;
  44.         }
  45.     }
  46.     catch(err){}
  47. }
  48.  
  49.  
  50. function PlayingDVD()
  51. {
  52.     return ( (player.currentPlaylist.count>0) && (player.currentPlaylist.item(0).sourceURL.indexOf("wmpdvd:")==0));
  53. }
  54.  
  55. function UpdateDVDControls()
  56. {
  57.     if (PlayingDVD())
  58.     {
  59.         txtVizTitle.visible = false;
  60.         btnDVDMenu.visible =  ( ("videoManagerMenu" != player.dvd.domain) && ("videoTitleSetMenu" != player.dvd.domain) ); 
  61.         btnDVDResume.visible = !btnDVDMenu.visible;
  62.     }
  63. }
  64.  
  65.