]> git.sesse.net Git - vlc/commitdiff
activex: simplify test.html
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 12 Feb 2010 10:46:09 +0000 (11:46 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 12 Feb 2010 14:53:16 +0000 (15:53 +0100)
projects/activex/test.html

index 2c614202705481792078ae25028c3d0686ddff6a..4d05ba6c8973446eb4c8881c054f7a7418b8b388 100644 (file)
@@ -1,45 +1,10 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
 <HTML>\r
 <TITLE>VLC Plugin test page</TITLE>\r
-<STYLE>\r
-  .inputTrackerInput {\r
-        height:20;\r
-        width:30;\r
-        font-family : Arial, Helvetica, sans-serif;\r
-        font-size : 12px;\r
-  }\r
-</STYLE>\r
-\r
-<SCRIPT type="text/javascript" src="blueshoes-4.5/javascript/lib/LibCrossBrowser.js"></SCRIPT>\r
-<SCRIPT type="text/javascript" src="blueshoes-4.5/javascript/lib/EventHandler.js"></SCRIPT>\r
-<SCRIPT type="text/javascript" src="blueshoes-4.5/javascript/core/form/Bs_FormUtil.lib.js"></SCRIPT>\r
-<SCRIPT type="text/javascript" src="blueshoes-4.5/javascript/components/slider/Bs_Slider.class.js"></SCRIPT>\r
 \r
 <SCRIPT language="JavaScript"><!--\r
 function init()\r
 {\r
-    inputTracker = new Bs_Slider();\r
-    if (inputTracker)\r
-    {\r
-        inputTracker.attachOnChange(onInputTrackerChange);\r
-        inputTracker.attachOnSlideStart(onInputTrackerScrollStart);\r
-        inputTracker.attachOnSlideEnd(onInputTrackerScrollEnd);\r
-        inputTracker.width         = 530 ;\r
-        inputTracker.height        = 15;\r
-        inputTracker.minVal        = 0;\r
-        inputTracker.maxVal        = 1.0;\r
-        inputTracker.valueDefault  = 0;\r
-        inputTracker.valueInterval = 1/530;\r
-        inputTracker.setDisabled(true);\r
-        inputTracker.imgDir   = 'blueshoes-4.5/javascript/components/slider/img/';\r
-        inputTracker.setBackgroundImage('aluminumalloyvolcanic/horizontal_background.gif', 'repeat');\r
-        inputTracker.setArrowIconLeft('aluminumalloyvolcanic/horizontal_backgroundLeft.gif', 2, 19);\r
-        inputTracker.setArrowIconRight('aluminumalloyvolcanic/horizontal_backgroundRight.gif', 2, 19);\r
-        inputTracker.setSliderIcon('aluminumalloyvolcanic/horizontal_knob.gif', 15, 19);\r
-        inputTracker.useInputField = 0;\r
-        inputTracker.draw('inputTrackerDiv');\r
-    }\r
-\r
     if( navigator.appName.indexOf("Microsoft Internet")==-1 )\r
     {\r
         onVLCPluginReady()\r
@@ -126,7 +91,6 @@ Insert VideoLAN.VLCPlugin.2
 <!--\r
 Insert Slider widget\r
 -->\r
-<DIV id="inputTrackerDiv"</DIV>\r
 </TD><TD width="15%">\r
 <DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV>\r
 <DIV id="state" style="text-align:center">Stopped...</DIV>\r
@@ -257,10 +221,6 @@ Insert Slider widget
 \r
 var rate = 0;\r
 var prevState = 0;\r
-var monitorTimerId = 0;\r
-var inputTracker;\r
-var inputTrackerScrolling = false;\r
-var inputTrackerIgnoreChange = false;\r
 var telxState = false;\r
 \r
 function doSetSlider()\r
@@ -519,10 +479,6 @@ function monitor()
         // current media is playing\r
         onPlaying();\r
     }\r
-    if( monitorTimerId == 0 )\r
-    {\r
-        monitorTimerId = setInterval("monitor()", 1000);\r
-    }\r
 };\r
 \r
 /* actions */\r
@@ -546,10 +502,7 @@ function doGo(targetURL)
         {\r
             // play MRL\r
             vlc.playlist.playItem(itemId);\r
-            if( monitorTimerId == 0 )\r
-            {\r
-                monitor();\r
-            }\r
+            monitor();\r
         }\r
         else\r
         {\r
@@ -600,11 +553,6 @@ function doStop()
     if( vlc )\r
         vlc.playlist.stop();\r
 \r
-    if( monitorTimerId != 0 )\r
-    {\r
-        clearInterval(monitorTimerId);\r
-        monitorTimerId = 0;\r
-    }\r
     onStop();\r
 }\r
 \r
@@ -654,44 +602,21 @@ var liveFeedRoll = 0;
 \r
 function onPlaying()\r
 {\r
-    if( !inputTrackerScrolling )\r
-    {\r
         var vlc = getVLC("vlc");\r
         var info = document.getElementById("info");\r
         if( vlc )\r
         {\r
             var mediaLen = vlc.input.length;\r
-            inputTrackerIgnoreChange = true;\r
             if( mediaLen > 0 )\r
             {\r
-                // seekable media\r
-                if( inputTracker )\r
-                {\r
-                    if( inputTracker.maxVal == 1.0 )\r
-                    {\r
-                        inputTracker.setDisabled(false);\r
-                        inputTracker.maxVal = 1.0;\r
-                    }\r
-                    inputTracker.setValue(vlc.input.position);\r
-                }\r
                 info.innerHTML = formatTime(vlc.input.time)+"/"+formatTime(mediaLen);\r
             }\r
             else\r
             {\r
                 // non-seekable "live" media\r
-                if( inputTracker )\r
-                {\r
-                    if( inputTracker.maxVal != 0.0 )\r
-                    {\r
-                        inputTracker.maxVal = 0.0;\r
-                        inputTracker.setValue(0.0);\r
-                        inputTracker.setDisabled(true);\r
-                    }\r
-                }\r
                 liveFeedRoll = liveFeedRoll & 3;\r
                 info.innerHTML = liveFeedText[liveFeedRoll++];\r
             }\r
-            inputTrackerIgnoreChange  = false;\r
         }\r
     }\r
 }\r
@@ -704,17 +629,6 @@ function onPause()
 \r
 function onStop()\r
 {\r
-    var vlc = getVLC("vlc");\r
-\r
-    if( inputTracker )\r
-    {\r
-        if( !inputTracker.disabled )\r
-        {\r
-            inputTracker.setValue(inputTracker.minVal);\r
-            inputTracker.setDisabled(true);\r
-        }\r
-    }\r
-\r
     document.getElementById("info").innerHTML = "-:--:--/-:--:--";\r
     document.getElementById("state").innerHTML = "Stopped...";\r
     document.getElementById("PlayOrPause").value = " Play ";\r
@@ -722,38 +636,9 @@ function onStop()
 \r
 function onError()\r
 {\r
-    var vlc = getVLC("vlc");\r
-\r
     document.getElementById("state").innerHTML = "Error...";\r
 }\r
 \r
-function onInputTrackerScrollStart()\r
-{\r
-    inputTrackerScrolling = true;\r
-}\r
-\r
-function onInputTrackerScrollEnd(inputTracker, value, pos)\r
-{\r
-    inputTrackerScrolling = false;\r
-}\r
-\r
-function onInputTrackerChange(inputTracker, value, pos)\r
-{\r
-    if( !inputTrackerIgnoreChange )\r
-    {\r
-        var vlc = getVLC("vlc");\r
-        if( vlc )\r
-        {\r
-            if( (vlc.input.state == 3) && (vlc.input.position != value) )\r
-            {\r
-                var info = document.getElementById("info");\r
-                vlc.input.position = value;\r
-                info.innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length);\r
-            }\r
-        }\r
-    }\r
-}\r
-\r
 function doMarqueeOption(option, value)\r
 {\r
     var vlc = getVLC("vlc");\r