<html>
<head><title>Demo of VLC mozilla plugin</title></head>
<body>
<h1 align="center">Demo of Firefox VLC Plugin</h1>
<embed autostart="true" type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"
version="VideoLAN.VLCPlugin.2" width="100%" height="85%" id="vlc" target="mms://media.xinhuanet.com/media4/tiyu/110114082513_news_fm_05.wmv">
</embed>
<script language="Javascript">
var vlc=document.getElementById("vlc");
var id=vlc.playlist.add("mms://media.xinhuanet.com/media4/tiyu/110114082513_news_fm_05.wmv");
var id;
vlc.playlist.playItem(id);
var seek_time = 1000 * 50;
var volume_number = 10;
function volume_up()
{
alert("Before up is " + vlc.audio.volume);
if((vlc.audio.volume + volume_number) <= 200)
{
vlc.audio.volume += volume_number;
}
else
{
vlc.audio.volume = 200;
}
alert("After up is " + vlc.audio.volume);
}
function volume_down()
{
alert("Before down is " + vlc.audio.volume);
if((vlc.audio.volume - volume_number)>= 0)
{
vlc.audio.volume -= volume_number;
}
else
{
vlc.audio.volume = 0;
}
alert("After down is " + vlc.audio.volume);
}
function onPause()
{
vlc.playlist.togglePause();
}
function onStop()
{
vlc.playlist.stop();
}
function onPlay()
{
vlc.input.rate = 1.0
}
function onFullscreen()
{
vlc.video.toggleFullscreen();
}
function onMute()
{
vlc.audio.toggleMute();
}
function onSeek_forward()
{
if((vlc.input.time + seek_time) < vlc.input.length )
{
vlc.input.time = vlc.input.time + seek_time;
}
else
{
vlc.input.time = 0;
}
}
function onSeek_backward()
{
if((vlc.input.time - seek_time)>= 0)
{
vlc.input.time -= seek_time;
}
else
{
vlc.input.time = 0
}
}
function fastForward()
{
vlc.input.rate = 8.0
}
function backForward()
{
vlc.input.rate = 0.5
}
</script>
<br />
<a href="javascript:;" οnclick='onPlay()'>Play</a>
<a href="javascript:;" οnclick='onPause()'>Pause</a>
<a href="javascript:;" οnclick='onStop()'>Stop</a>
<a href="javascript:;" οnclick='onFullscreen()'>Fullscreen</a>
<a href="javascript:;" οnclick="volume_up()">Volume_Up</a>
<a href="javascript:;" οnclick="volume_down()">Volume_Down</a>
<a href="javascript:;" οnclick="onMute()">Mute</a>
<a href="javascript:;" οnclick="onSeek_forward()">Seek_forward</a>
<a href="javascript:;" οnclick="onSeek_backward()">Seek_backward</a>
<a href="javascript:;" οnclick="fastForward()">FastForward</a>
<a href="javascript:;" οnclick="backForward()">BackForward</a>
</body>
</html>
VLC in firefox
最新推荐文章于 2023-09-06 10:59:20 发布