video image stays on browser window when tabbed

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
richard6235
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Feb 2011 10:59

video image stays on browser window when tabbed

Postby richard6235 » 10 Mar 2011 09:16

Hey Guys
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>
Thanks Ric

jack.ting
Blank Cone
Blank Cone
Posts: 35
Joined: 19 Jan 2011 04:04

Re: video image stays on browser window when tabbed

Postby jack.ting » 14 Mar 2011 08:15

Hey,

I test it on 2 XP boxes (one with hardware GPU accelerate) with IE8 and firefox, both of them work fine (with my test vidio clip (avi file)).

I think maybe it's the GPU driver or the codec implement problem.
To identify the problem, you could test it on some other PC, and change the code to play some other video clip instead of video stream.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests