id="vlc">
</EMBED>
</TD></TR>
-</TD><TD width="15%">
-<DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV>
-</TD></TR>
-<TR><TD colspan="2">
+<TR><TD>
<INPUT type=button id="PlayOrPause" value=" Play " onClick='doPlayOrPause()'>
-<INPUT type=button value="Stop" onClick='document.vlc.playlist.stop();'>
-
-<INPUT type=button value=" << " onClick='document.vlc.playlist.playSlower();'>
-<INPUT type=button value=" >> " onClick='document.vlc.playlist.playFaster();'>
+<INPUT type=button value="Stop" onClick='document.getElementById("vlc").playlist.stop();'>
-<INPUT type=button value="Show" onClick='document.vlc.visible = true;'>
-<INPUT type=button value="Hide" onClick='document.vlc.visible = false;'>
+<INPUT type=button value=" << " onClick='doPlaySlower();'>
+<INPUT type=button value=" >> " onClick='doPlayFaster();'>
-<INPUT type=button value="Version" onClick='alert(document.vlc.VersionInfo);'>
+<INPUT type=button value="Version" onClick='alert(document.getElementById("vlc"));'>
<SPAN style="text-align:center">Volume:</SPAN>
<INPUT type=button value=" - " onClick='updateVolume(-10)'>
<SPAN id="volumeTextField" style="text-align: center">--</SPAN>
<INPUT type=button value=" + " onClick='updateVolume(+10)'>
-<INPUT type=button value="Mute" onClick='document.vlc.audio.togglemute();'>
-</TD>
-</TR>
+<INPUT type=button value="Mute" onClick='document.getElementById("vlc").audio.toggleMute();'>
+</TD><TD width="15%">
+<DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV>
+</TD></TR>
</TABLE>
<SCRIPT LANGUAGE="Javascript">
<!--
function updateVolume(deltaVol)
{
- var plugin = document.getElementById('vlc');
- plugin.audio.volume += deltaVol;
- volumeTextField.innerText = plugin.audio.volume+"%";
+ var vlc = document.getElementById("vlc");
+ vlc.audio.volume += deltaVol;
+ document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%";
};
function formatTime(timeVal)
{
};
function onStop()
{
- info.innerText = "-:--:--/-:--:--";
+ document.getElementById("info").innerHTML = "-:--:--/-:--:--";
document.getElementById("PlayOrPause").value = " Play ";
};
var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
function doUpdate()
{
- if( vlc.playlist.isplaying )
+ var vlc = document.getElementById("vlc");
+ if( vlc.playlist.isPlaying )
{
if( vlc.input.length > 0 )
{
// seekable stream
- info.innerText = formatTime(vlc.input.time/1000)+"/"+formatTime(vlc.input.length/1000);
+ document.getElementById("info").innerHTML = formatTime(vlc.input.time/1000)+"/"+formatTime(vlc.input.length/1000);
document.getElementById("PlayOrPause").Enabled = true;
}
else {
liveFeedRoll = liveFeedRoll & 3;
- info.innerText = liveFeedText[liveFeedRoll++];
+ document.getElementById("info").innerText = liveFeedText[liveFeedRoll++];
}
timerId = setTimeout("doUpdate()", 1000);
}
function doGo(targetURL)
{
var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
- document.vlc.playlist.add(targetURL, null, options);
+ document.getElementById("vlc").playlist.add(targetURL, null, options);
};
function doPlayOrPause()
{
- if( document.vlc.playlist.isplaying )
+ var vlc = document.getElementById("vlc");
+ if( vlc.playlist.isPlaying )
{
- document.vlc.playlist.pause();
+ vlc.playlist.pause();
}
else
{
- document.vlc.playlist.play();
+ vlc.playlist.play();
}
};
+function doPlaySlower()
+{
+ var vlc = document.getElementById("vlc");
+ vlc.input.rate = vlc.input.rate / 2;
+};
+function doPlayFaster()
+{
+ var vlc = document.getElementById("vlc");
+ vlc.input.rate = vlc.input.rate * 2;
+};
function vlcPlayEvent()
{
if( ! timerId )