I have a problem in firefox with the VLC plugin that when I tab the window after I have started playing a video, the last image before tabbing is still displayed on all the newly tabbed windows. Even if I refresh my page it still doesn't disappear.
Below is my code:
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ipTV VLC</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<script type='text/javascript'>
function WriteVLC(str, xsz, ysz) {
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
document.write('<object type="application/x-vlc-plugin"');
document.write(' version="VideoLAN.VLCPlugin.2"');
document.write(' pluginspage="http://www.videolan.org"');
} else { // IE
document.write('<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"');
document.write(' codebase="http://download.videolan.org/pub/videolan/vlc/0.8.6c/win32/axvlc.cab"');
}
document.writeln(' id="'+str+'" name="'+str+'" width='+xsz+' height='+ysz+' events="true">');
document.writeln('</object>');
}
</script>
<body>
<div id="wrap">
<div id="header">
<img id="logo" src="images/iptv.png">
</div>
<div id="content">
<div id="channelList">
<ul>
<li><a href="javascript:;" onClick="vlc.playlist.playItem(0)">RTL4</a></li>
<li><a href="javascript:;" onClick="vlc.playlist.playItem(1)">RTL5</a></li>
</ul>
</div>
<script type="text/javascript">WriteVLC("vlc", 450, 305);</script>
<script type="text/javascript">
function mute() {
vlc.audio.toggleMute();
}
function pause() {
vlc.playlist.togglePause();
}
function stop() {
vlc.playlist.stop();
}
function next() {
if (vlc.playindex == vlc.playlist.items.count) {
vlc.playlist.playItem(0);
vlc.playindex = 1;
} else {
vlc.playlist.next();
vlc.playindex ++;
}
}
function prev() {
if (vlc.playindex == 1) {
vlc.playindex = vlc.playlist.items.count;
vlc.playlist.playItem(vlc.playindex-1);
} else {
vlc.playindex --;
vlc.playlist.prev();
}
}
function fullscreen() {
vlc.video.toggleFullscreen();
}
var vlc = new Object();
function fnInit() {
vlc = document.getElementById('vlc');
vlc.playlist.clear();
vlc.playlist.add('udp://@239.100.1.1:4422'); //rtl4
vlc.playlist.add('udp://@239.100.1.2:4422'); //rtl5
vlc.playlist.playItem(0);
vlc.playindex = 1;
}
function regEvent(tobj, type, func) {
if (tobj.addEventListener)
tobj.addEventListener(type, func, true);
else if (tobj.attachEvent)
tobj.attachEvent("on" + type, func);
else tobj["on" + type] = func;
}
regEvent(window, 'load', fnInit);
</script>
<br>
<input type="button" onClick='pause();' value="Play/Pause" />
<input type="button" onClick='mute();' value="Mute" />
<input type="button" onClick='stop();' value="Stop" />
<input type="button" onClick='prev();' value="Channel Down" />
<input type="button" onClick='next();' value="Channel Up" />
<input type="button" onClick='fullscreen();' value="Fullscreen" />
</div> <!-- close tag for content -->
</div>
</div> <!-- close tag for main -->
</div> <!-- close tag for wrap -->
<div id="footer"></div>
</body>
</html>