2 <TITLE>VLC Mozilla plugin test page</TITLE>
7 <INPUT size="90" id="targetTextField" value="">
8 <INPUT type=submit value="Go" onClick="doGo(document.getElementById('targetTextField').value);">
11 <EMBED type="application/x-vlc-plugin" pluginspage="http://www.videolan.org/" version="VideoLAN.VLCPlugin.2"
18 <INPUT type=button id="PlayOrPause" value=" Play " onClick='doPlayOrPause()'>
19 <INPUT type=button value="Stop" onClick='document.getElementById("vlc").playlist.stop();'>
21 <INPUT type=button value=" << " onClick='doPlaySlower();'>
22 <INPUT type=button value=" >> " onClick='doPlayFaster();'>
24 <INPUT type=button value="Version" onClick='alert(document.getElementById("vlc"));'>
25 <SPAN style="text-align:center">Volume:</SPAN>
26 <INPUT type=button value=" - " onClick='updateVolume(-10)'>
27 <SPAN id="volumeTextField" style="text-align: center">--</SPAN>
28 <INPUT type=button value=" + " onClick='updateVolume(+10)'>
29 <INPUT type=button value="Mute" onClick='document.getElementById("vlc").audio.toggleMute();'>
31 <DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV>
34 <SCRIPT LANGUAGE="Javascript">
38 function updateVolume(deltaVol)
40 var vlc = document.getElementById("vlc");
41 vlc.audio.volume += deltaVol;
42 document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%";
44 function formatTime(timeVal)
46 var timeHour = timeVal;
47 var timeSec = timeHour % 60;
49 timeSec = '0'+timeSec;
50 timeHour = (timeHour - timeSec)/60;
51 var timeMin = timeHour % 60;
53 timeMin = '0'+timeMin;
54 timeHour = (timeHour - timeMin)/60;
56 return timeHour+":"+timeMin+":"+timeSec;
58 return timeMin+":"+timeSec;
62 document.getElementById("PlayOrPause").value = "Pause";
66 document.getElementById("PlayOrPause").value = " Play ";
70 document.getElementById("info").innerHTML = "-:--:--/-:--:--";
71 document.getElementById("PlayOrPause").value = " Play ";
73 var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
78 var vlc = document.getElementById("vlc");
79 if( vlc.playlist.isPlaying )
81 if( vlc.input.length > 0 )
84 document.getElementById("info").innerHTML = formatTime(vlc.input.time/1000)+"/"+formatTime(vlc.input.length/1000);
85 document.getElementById("PlayOrPause").Enabled = true;
88 liveFeedRoll = liveFeedRoll & 3;
89 document.getElementById("info").innerText = liveFeedText[liveFeedRoll++];
91 timerId = setTimeout("doUpdate()", 1000);
99 function doGo(targetURL)
101 var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
102 document.getElementById("vlc").playlist.add(targetURL, null, options);
104 function doPlayOrPause()
106 var vlc = document.getElementById("vlc");
107 if( vlc.playlist.isPlaying )
109 vlc.playlist.pause();
116 function doPlaySlower()
118 var vlc = document.getElementById("vlc");
119 vlc.input.rate = vlc.input.rate / 2;
121 function doPlayFaster()
123 var vlc = document.getElementById("vlc");
124 vlc.input.rate = vlc.input.rate * 2;
126 function vlcPlayEvent()
130 timerId = setTimeout("doUpdate()", 1000);
134 function vlcPauseEvent()
138 clearTimeout(timerId)
143 function vlcStopEvent()
147 clearTimeout(timerId)