VLC plugin in windowless mode : no real fullscreen !

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

VLC plugin in windowless mode : no real fullscreen !

Postby zeepee » 04 Jul 2018 00:57

Hi everyone !

I have coded my own "TV app" using the VLC plugin in Firefox (now rel. 52) under Windows10 (used to be Win7), all's fine and dandy, been pretty happy with it so far (for a few years in fact). I'm streaming a DVB-T card to watch TV with various controls, window sizes, etc... the app is basic HTML/CSS/JS (no framework like JQuery).

Now for the problem : while in "windowless=false" mode I can get to full screen video w/o a glitch, this does not work in windowless mode. Instead when requesting to go full screen the video picture itself stays the same (small) size while the rest of the screen goes black (well, 99% of the screen, I can still click outside the black area on the outer border of the screen).

Note that I do mozRequestFullScreen() on the vlc plugin embed/object in order to (try to) achieve full screen, but no way. I've looked around extensively but couldn't find an answer (just found a vlc bug report page where the same problem is discussed, in the end the OP says "I've found a solution, thanks !" but doesn't bother to say anything about how he/she fixed the problem. :(

Any idea would be welcome, and/or ask for more details if necessary - thank you.

zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

Re: VLC plugin in windowless mode : no real fullscreen !

Postby zeepee » 04 Jul 2018 01:02

Not sure it helps all that much, but posted a screendump below :

Image

Needless to say, I'd rather have the picture occupy the entire screen. :mrgreen: (which is the case when the vlc plugin embed is set to windowless="false", no problem then I do get a full size video picture).

zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

Re: VLC plugin in windowless mode : no real fullscreen !

Postby zeepee » 04 Jul 2018 17:37

Just updated to VLC 3.0.3 (from 2.x.x), but issue still present (not that I was expecting a change, nothing to that affect in the change log from v2).

As a side note, I tried a test page using the html5 <video> tag for reading a mp4 movie in Firefox, works fine and does fullscreen as expected (using the same Element.mozRequestFullScreen() method as with the vlc plugin, Element pointing to the video object on the page).

I thought I'd post a bit of the coding I have in my TV/radio applet, here's the vlc plugin embed code (inside a container div) :

Code: Select all

<div id="prevdiv"> <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" events="true" width="100%" height="100%" id= "preview" type= "application/x-vlc-plugin" pluginspage= "http://www.videolan.org" version= "VideoLAN.VLCPlugin.2" width= "320" height= "180" style="z-index:-1" bgcolor= "black" toolbar= "false" autoplay= "no" text= " -- NO CHANNEL PLAYING --" target= "" windowless= "true" ></object> </div>

Anything wrong with the code above ? (it has worked fine for years and still does - except for the issue exposed in the 1st post - but maybe a bit outdated ?)

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

Re: VLC plugin in windowless mode : no real fullscreen !

Postby da2424 » 05 Jul 2018 14:35

Hi,

the issue with resizing in windowless mode is a known problem: https://trac.videolan.org/vlc/ticket/7995
As workaround, you have to restart the playback while you are in fullscreen mode. With javascript, you could save the current timestamp and set it again after restarting in fullscreen mode.

Here is an optimization of your source code, which should also work in Internet Explorer:

Code: Select all

<div id="prevdiv"> <embed id= "preview" type= "application/x-vlc-plugin" pluginspage= "http://www.videolan.org" version= "VideoLAN.VLCPlugin.2" width= "320" height= "180" style="z-index:-1" bgcolor= "black" toolbar= "false" autoplay= "no" text= " -- NO CHANNEL PLAYING --" target= "" windowless= "true" /> </div>

zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

Re: VLC plugin in windowless mode : no real fullscreen !

Postby zeepee » 05 Jul 2018 17:40

Hi da2424,

thanxx a bunch for yr answer. As for the code you just posted I'll give it a try, in fact this whole thing is giving me the opportunity to revisit several areas of my years-old applet code, and well... it does need some overall rethinking, in fact I might rewrite a good chunk of it whenever I find the time for it.

I'll also try the workaround you mentioned, actually it reminds me of the solution I read in a bug report/ticket I mentioned in my previous post, probably the same idea - so I'll give it a shot and report back here.

Btw, since my update to v3 of VLC, the plugin has stopped responding to a double-click on the video frame : it used to go (or exit) fullscreen on double-click (very convenient) - well, not anymore. I guess I can add some event in JS as a replacement for this behaviour, so this shouldn't be a big issue, we shall see...

zeepee
Blank Cone
Blank Cone
Posts: 29
Joined: 17 Nov 2012 01:21

Re: VLC plugin in windowless mode : no real fullscreen !

Postby zeepee » 05 Jul 2018 17:54

Oh and btw using "viewID.video.fullscreen= true;" (vlc plugin-specific code) vs "viewID.mozRequestFullScreen();" (FF html5/JS) yields different behaviours - this may be normal I dunno, but it tells me that I'll have to try various combinations of html/JS code and see how it goes...


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 7 guests