home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / Chip_2003-05_cd1.bin / zkuste / wmakeup / download / Vario.wmz / vario.js < prev    next >
Encoding:
Text File  |  2000-07-18  |  6.7 KB  |  372 lines

  1. var Movie=false;
  2. var videomode=1;
  3. var vismode=0;
  4. var draweropen=false;
  5. var playlistopen=false;
  6. var muteing=false;
  7. var audioopen=false;
  8. var videoopen=false;
  9. var AVopen=false;
  10. var tempfilename = "nothing";
  11. var shuffling=false;
  12. var medianame="nothing";
  13.  
  14. function Loading()    {
  15.  
  16.     pl.setColumnResizeMode( 1, "AutoSizeData" );
  17.     pl.setColumnResizeMode( 0, "Stretches" );
  18.     vis.currentEffectType = mediacenter.effectType;
  19.     vis.currentPreset = mediacenter.effectPreset;
  20.     ShouldVis();
  21.     MetaData1();
  22.  
  23.             }
  24.  
  25. function Closing()    {
  26.  
  27.     mediacenter.effectType = vis.currentEffectType;
  28.     mediacenter.effectPreset = vis.currentPreset;
  29.  
  30.             }
  31.  
  32. function ShouldVis()    {
  33.  
  34. vis.visible = ((player.playstate == psPlaying || player.playstate == psPaused) && (!(player.currentMedia.ImageSourceWidth > 0)));
  35. vid.visible = ((player.playstate != psStopped) && (player.currentMedia.ImageSourceWidth > 0));
  36. vid.maintainAspectRatio = true;
  37. vid.stretchToFit = true;
  38.  
  39. stopbutton.visible = (player.playstate == psPlaying);
  40.  
  41. if (vis.visible)
  42.     ChangeVisMode();
  43.  
  44. if (vid.visible)
  45.     ChangeVidMode();
  46.  
  47. MetaData2();
  48.  
  49.             }
  50.  
  51. function VideoStart()    {
  52.  
  53. Movie = true;
  54. vid.visible = true;
  55. vid.maintainAspectRatio = true;
  56. vid.stretchToFit = true;
  57. vis.visible = false;
  58.  
  59.             }
  60.  
  61. function VideoEnd()    {
  62.  
  63. Movie = false;
  64. vis.visible = false;
  65. vid.visible = false;
  66.  
  67.             }
  68.  
  69. function VidMode()    {
  70.  
  71. if (player.currentMedia.ImageSourceWidth > 0){
  72.  
  73.         if (videomode==1)
  74.             videomode=0;
  75.         else
  76.             videomode=1;
  77.  
  78.         ChangeVidMode();
  79.  
  80.                              }
  81.  
  82. else    {
  83.  
  84.         if (vismode==1)
  85.             vismode=0;
  86.         else
  87.             vismode=1;
  88.  
  89.         ChangeVisMode();
  90.  
  91.     }
  92.  
  93.             }
  94.  
  95. function ChangeVidMode(){
  96.  
  97. if (videomode==0){
  98.     largemode.visible=false;
  99.     vid.visible=false;
  100.     vid.left="160";
  101.     vid.top="94";
  102.     vid.width="128";
  103.     vid.height="99";
  104.         vid.maintainAspectRatio = true;
  105.     vid.stretchToFit = true;
  106.     smallvideomode.visible=true;
  107.     smallvisback.visible=false;
  108.     smallvismode.visible=false;
  109.     vid.visible=true;
  110.     MetaData1();
  111.         }
  112.  
  113. if (videomode==1){
  114.     vid.visible=false;
  115.     smallvismode.visible=false;
  116.     smallvisback.visible=false;
  117.     smallvideomode.visible=false;
  118.     vid.left="53";
  119.     vid.top="52";
  120.     vid.width="245";
  121.     vid.height="184";
  122.     vid.maintainAspectRatio = true;
  123.     vid.stretchToFit = true;
  124.     largemode.visible=true;
  125.     vid.visible=true;
  126.     MetaData1();
  127.         }
  128.  
  129.             }
  130.  
  131.  
  132. function ChangeVisMode(){
  133.  
  134. if (vismode==0) {
  135.     largemode.visible=false;
  136.     vis.left="157"
  137.     vis.top="93";
  138.     vis.width="134";
  139.     vis.height="100";
  140.     smallvismode.visible=true;
  141.     smallvideomode.visible=false;
  142.     smallvisback.visible=true;
  143.     MetaData1();
  144.         }
  145.  
  146. if (vismode==1){
  147.     smallvisback.visible=false;
  148.     smallvideomode.visible=false;
  149.     smallvismode.visible=false;
  150.     vis.left="38";
  151.     vis.top="52";
  152.     vis.width="287";
  153.     vis.height="185";
  154.     largemode.visible=true;
  155.     MetaData1();
  156.         }
  157.  
  158. }
  159.  
  160. function MetaData1()
  161. {
  162.     switch (player.OpenState)
  163.     {
  164.     case osUndefined:
  165.         break;
  166.     case osMediaOpen:
  167.         MetaData2();
  168.         break;
  169.     }
  170. }
  171.  
  172. function MetaData2()
  173. {
  174.  
  175.     clip.value = player.currentmedia.getiteminfo("#title");
  176.     if(clip.value == "")
  177.         clip.value = player.currentmedia.name;
  178.  
  179.     filename.value = player.currentmedia.getiteminfo("#name");
  180.     if(filename.value == "")
  181.         filename.value = player.currentmedia.name;
  182.  
  183.     audiobitrate.value = player.currentmedia.getiteminfo("#Bitrate");
  184.     if(audiobitrate.value == "")
  185.         audiobitrate.value = player.currentmedia.getiteminfo("Bitrate");
  186.  
  187.     streambitrate.value = player.currentmedia.getiteminfo("#Bitrate");
  188.     if(streambitrate.value == "")
  189.         streambitrate.value = player.currentmedia.getiteminfo("Bitrate");
  190.  
  191.     show.value = player.currentplaylist.getiteminfo("#title");
  192.     if(show.value == "")
  193.         show.value = player.currentmedia.getiteminfo("WM/AlbumTitle");
  194.  
  195.     showing.value = player.currentplaylist.getiteminfo("#title");
  196.     if(showing.value == "")
  197.         showing.value = player.currentmedia.getiteminfo("WM/AlbumTitle");
  198.  
  199. }
  200.  
  201. function PlaylistMove()
  202. {
  203.     if (playlistopen)
  204.     {
  205.         pl.visible=false;
  206.         playlist1.moveTo(0,0,2000);
  207.         playlistgroup.moveTo(188,119,1000);
  208.         playlistopen = false;
  209.     }
  210.     else
  211.     {
  212.         playlistgroup.moveTo(188,221,1000);
  213.         playlist1.moveTo(0,59,2000);
  214.         playlistopen = true;
  215.  
  216.     }
  217. }
  218.  
  219. function plDoneMoving() {
  220.  
  221.     if (playlistopen)
  222.         pl.visible = true;
  223.     else
  224.         pl.visible = false;
  225.             }
  226.  
  227.  
  228. function FullScreen()   {
  229.  
  230. if (vis.visible)
  231.     vis.fullScreen=true;
  232.  
  233. if (vid.visible)
  234.     vid.fullScreen=true;
  235.  
  236.             }
  237.  
  238.  
  239. function MuteMe(){
  240.  
  241. if (muteing){
  242.     player.Settings.mute = false;
  243.     muteing=false;
  244.         }
  245. else        {
  246.     player.Settings.mute = true;
  247.     muteing=true;
  248.         }
  249.  
  250.          }
  251.  
  252.  
  253. function AudioControls(){
  254.  
  255.     if (audioopen && draweropen)
  256.     {
  257.         drawer1.moveTo(147,78,200);
  258.         draweropen = false;
  259.         AVopen=false;
  260.         audioopen = false;
  261.         videoopen = false;
  262.         audiocontrols1.visible=false;
  263.         videocontrols1.visible=false;
  264.         avmain.visible=false;
  265.         animation.top="2000"
  266.     }
  267.     else
  268.     {
  269.         avmain.visible=false;
  270.         videocontrols1.visible=false;
  271.         drawer1.moveTo(0,78,200);
  272.         AVopen=false;
  273.         audioopen=true;
  274.         draweropen=true;
  275.         videoopen = false;
  276.         audiocontrols1.visible=true;
  277.         
  278.     }
  279.         
  280.             }
  281.  
  282. function VideoControls(){
  283.  
  284.     if (videoopen && draweropen)
  285.     {
  286.         drawer1.moveTo(147,78,200);
  287.         AVopen=false;
  288.         draweropen = false;
  289.         audioopen = false;
  290.         videoopen = false;
  291.          audiocontrols1.visible=false;
  292.         videocontrols1.visible=false;
  293.         avmain.visible=false;
  294.         animation.top="2000"
  295.  
  296.     }
  297.     else
  298.     {
  299.         avmain.visible=false;
  300.         audiocontrols1.visible=false;
  301.         drawer1.moveTo(0,78,200);
  302.         AVopen=false;
  303.         videoopen=true;
  304.         draweropen=true;
  305.         audioopen = false;
  306.         videocontrols1.visible=true;
  307.         
  308.     }
  309.         
  310.             }
  311.  
  312. function Drawer()
  313. {
  314.     if (draweropen)
  315.     {
  316.         avmain.visible=false;
  317.         audiocontrols1.visible=false;
  318.         videocontrols1.visible=false;
  319.         drawer1.moveTo(147,78,200);
  320.         draweropen = false;
  321.         animation.left="0";
  322.         animation.top="2000";
  323.         AVopen=false;
  324.         audioopen = false;
  325.         videoopen = false;
  326.     }
  327.     else
  328.     {
  329.         avmain.visible=false;
  330.         videocontrols1.visible=false;
  331.         videocontrols1.visible=false;
  332.         drawer1.moveTo(0,78,200);
  333.         draweropen = true;
  334.         audioopen = false;
  335.         AVopen=false;
  336.         videoopen = false;
  337.         AVMain();
  338.     }
  339. }
  340.  
  341. function AVMain(){
  342.  
  343.     if (AVopen && draweropen)
  344.     {
  345.         drawer1.moveTo(147,78,200);
  346.         draweropen = false;
  347.         AVopen=false;
  348.         audioopen = false;
  349.         videoopen = false;
  350.         avmain.visible=false;
  351.         animation.left="0";
  352.         animation.top="2000"
  353.          audiocontrols1.visible=false;
  354.         videocontrols1.visible=false;
  355.  
  356.     }
  357.     else
  358.     {
  359.         audiocontrols1.visible=false;
  360.         videocontrols1.visible=false;
  361.         drawer1.moveTo(0,78,200);
  362.         animation.left="3";
  363.         animation.top="2";
  364.         AVopen=true;
  365.         videoopen=false;
  366.         draweropen=true;
  367.         audioopen = false;
  368.         avmain.visible=true;
  369.         
  370.     }
  371.  
  372.          }