<div align="center">
<table>
<tr> <td>
<embed type="application/x-vlc-plugin" pluginspage="
http://www.videolan.org" version="VideoLAN.VLCPlugin.2"
width="640"
height="480"
autoplay="no"
id="vlc"
target="videosample.avi">
</embed>
<div id="info">
</div>
<input type="button" class="sed1" onclick="else_r();" size='30' value="Info" />
<textarea id="txtout" rows="10" cols="45"></textarea>
</td> <td>
<script type="text/javascript">
var vlc = document.getElementById("vlc");
if(vlc){
document.getElementById("info").innerHTML = "Ready";
} else {
document.getElementById("info").innerHTML = "Not Ready";
}
function mute(){
vlc.audio.toggleMute();
}
function play(){
vlc.playlist.play();
intval = setInterval(uptime, 250);
}
function stop(){
clearInterval(intval);
vlc.playlist.stop();
}
function pause(){
vlc.playlist.togglePause();
}
function c_time(){
return eval(vlc.input.time / 1000);
}
function seek(value){
var vlc = document.getElementById("vlc");
//alert(value);
vlc.input.time = eval(value*1000)
//return true;
}
function backof(value){
var vlc = document.getElementById("vlc");
vlc.input.time = vlc.input.time - eval(value*1000);
//alert(vlc.input.state);
//return true;
}
function uptime(){
document.getElementById("nowt").innerHTML = eval(vlc.input.time/1000);
}
function else_r(){
oi = document.getElementById("txtout");
oi.value = '';
oi.value += vlc.versionInfo() +"\n";
oi.value += "VLC position " + vlc.input.position +"\n";
oi.value += "VLC length " + vlc.input.length +"\n";
oi.value += "VLC rate " + vlc.input.rate +"\n";
oi.value += "VLC is Playing " + vlc.playlist.isPlaying +"\n";
}
</script>
<input type="button" onclick='play();' value="Play" />
<input type="button" onclick='pause();' value="Pause" />
<input type="button" onclick='stop();' value="Stop" />
<input type="button" onclick='document.getElementById("info").innerHTML = c_time();' value="Time" />
<input type="button" onclick='mute();' value="Mute" />
<div>
<input id="seekto" type="text" size="4" value="10" />
<input type="button" class="sed1" onclick="seek(document.getElementById('seekto').value);" size='30' value="Seek (sec)" />
<input id="backof" type="text" size="4" value="5" />
<input type="button" class="sed1" onclick="backof(document.getElementById('backof').value);" size='30' value="Back of (sec)" />
</div>
<div id="nowt">
</div>
</td></tr>
</table>
</div>