home *** CD-ROM | disk | FTP | other *** search
/ Freelog 52 / Freelog052.iso / Extra / Multimedia / WMPXP / MPSetupXP.exe / 1033 / RCDATA / CABINET / Compact.wmz / transport.js < prev    next >
Text File  |  2002-07-18  |  3KB  |  173 lines

  1. // Windows Media Player  - Copyright 2001 Microsoft Corporation.
  2.  
  3. function OnStatusChangeTransport()
  4. {
  5.     metadata.value=player.status;
  6. }
  7.  
  8. function OnFFWD()
  9. {
  10.     if (player.PlayState == psScanForward)
  11.     {
  12.         player.controls.play();
  13.     }
  14.     else
  15.     {
  16.         player.controls.FastForward();
  17.     }
  18. }
  19.         
  20. function OnREW()
  21. {
  22.     if (player.PlayState == psScanReverse)
  23.     {
  24.         player.controls.play();
  25.     }
  26.     else
  27.     {
  28.         player.controls.FastReverse();
  29.     }
  30. }
  31.  
  32. function volumeOnChange()
  33. {
  34.     player.settings.mute=false;
  35. }
  36.  
  37. function muteOnClick()
  38. {
  39.     player.settings.mute = (player.settings.mute == true) ? false : true;
  40. }
  41.  
  42. function OnPlayStateChangeTransport(NewState)
  43. {
  44.     g_psPlayState=NewState;
  45.    
  46.     switch (NewState)
  47.     {
  48.     case psUndefined:
  49.             seek.foregroundProgress = 0;
  50.             rew.down=false;
  51.             ffwd.down=false;
  52.         break;
  53.  
  54.     case psTransitioning:
  55.             rew.down=false;
  56.             ffwd.down=false;
  57.         break;            
  58.         
  59.     case psReady:
  60.             seek.foregroundProgress = 0;
  61.             rew.down=false;
  62.             ffwd.down=false;
  63.         break;
  64.  
  65.     case psStopped:
  66.             ffwd.down=false;
  67.             rew.down=false;
  68.         break;
  69.         
  70.     case psPaused:
  71.             ffwd.down=false;
  72.             rew.down=false;
  73.         break;
  74.         
  75.     case psPlaying:
  76.             ffwd.down=false;
  77.             rew.down=false;
  78.         break;
  79.         
  80.     case psWaiting:
  81.             rew.down=false;
  82.             ffwd.down=false;
  83.         break;
  84.         
  85.     case psScanForward:
  86.             rew.down=false;
  87.             ffwd.down=true;
  88.         break;
  89.         
  90.     case psScanReverse:
  91.             rew.down=true;
  92.             ffwd.down=false;
  93.         break;
  94.         
  95.     case psBuffering:
  96.         break;
  97.     }
  98. }
  99.  
  100. function OnOpenStateChangeTransport(NewState)
  101. {
  102.     g_osOpenState=NewState;
  103.     switch (NewState)
  104.     {
  105.     case osUndefined:
  106.         tracktime.visible=false;
  107.         g_fIsLiveBroadcast=false;
  108.         break;
  109.         
  110.     case osPlaylistChanging:
  111.         break;
  112.  
  113.     case osPlaylistLocating:
  114.         break;
  115.  
  116.     case osPlaylistConnecting:
  117.         break;
  118.  
  119.     case osPlaylistLoading:
  120.         break;
  121.  
  122.     case osPlaylistOpening:
  123.         break;
  124.  
  125.     case osPlaylistOpenNoMedia:
  126.         break;
  127.  
  128.     case osPlaylistChanged:
  129.         break;
  130.  
  131.     case osMediaChanging:
  132.         break;
  133.  
  134.     case osMediaLocating:
  135.         break;
  136.  
  137.     case osMediaConnecting:
  138.         break;
  139.  
  140.     case osMediaLoading:
  141.         break;
  142.  
  143.     case osMediaWaiting:
  144.         g_fIsLiveBroadcast = (player.currentMedia.getItemInfo("Type") == "broadcast");
  145.         seek.enabled = !g_fIsLiveBroadcast;
  146.         break;
  147.  
  148.     case osMediaOpening:
  149.         break;
  150.  
  151.     case osMediaOpen: 
  152.         tracktime.visible=true;
  153.         g_fIsLiveBroadcast = (player.currentmedia.getiteminfo("Type") == "broadcast");
  154.         seek.enabled = !g_fIsLiveBroadcast;
  155.         break;
  156.  
  157.     case osBeginLicenseAcquisition:
  158.         break;
  159.  
  160.     case osEndLicenseAcquisition:
  161.         break;
  162.  
  163.     case osBeginIndividualization:
  164.         break;
  165.  
  166.     case osEndIndividualization:
  167.         break;
  168.  
  169.     default:
  170.         break;
  171.     }    
  172. }
  173.