IE (ActiveX) Plugin Fullscreen / VLC app setting

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
tomakaze
New Cone
New Cone
Posts: 4
Joined: 13 Oct 2006 13:43
Location: Helsinki, Finland
Contact:

IE (ActiveX) Plugin Fullscreen / VLC app setting

Postby tomakaze » 13 Oct 2006 13:56

There is one problem I notice with the 0.8.5 build of the Active X plugin, which possibly nobody has noticed, but maybe it has been fixed in a later release.

In the VLC app preferences, if you check the option "Fullscreen video output" it will automatically open fullscreen when VLC is loaded in a webpage. This is cool.

BUT, if you uncheck the box, the javascript fullscreen method no longer works! That is not cool, so now I am not using the fullscreen button anymore, but telling people to click the video picture for fullscreen. That works ok, but this is still a bug I would say.

Another thing I noticed in IE, is that all ActiveX plugins require clicking first to be controlled. If you click the VLC object however the picture goes black, so this doesn't help when going from Fullscreen and then back again.

I was able to work around IE taking control of ActiveX objects by writing the object via javascript when the page is loading, and then IE doesn't even notice it :)

lagarazo
Blank Cone
Blank Cone
Posts: 34
Joined: 20 Sep 2006 13:50

Postby lagarazo » 13 Oct 2006 15:10

How do you "write the object via javascript when the page is loading"?

What does it solve?

tomakaze
New Cone
New Cone
Posts: 4
Joined: 13 Oct 2006 13:43
Location: Helsinki, Finland
Contact:

Writing VLC object with Javascript to trick IE

Postby tomakaze » 13 Oct 2006 15:24

Like this... Otherwise IE detects the ActiveX object in the html and puts this yellow line around the object, saying click to activate. When you click it, the VLC picture goes black even though it keeps playing.

This is a new security "feature" of IE, which they introduced in July, but it really blows. It does the same thing with Flash and Windows Media Player, which is confusing since you can't interact with the object until you click it once. This javascript writing would be the key for anybody to write any object to IE, rather than displaying it inline with html.

I'd be surprised if nobody else noticed this problem, because it was pretty obvious when clicking the video to activate fullscreen.

Code: Select all

function loadObject() { var vlc_html = ''; vlc_html += '<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width=480 height=360 id="vlc" events="True" VIEWASTEXT>'; vlc_html += '<param name="MRL" value="" />'; vlc_html += '<param name="ShowDisplay" value="True" />'; vlc_html += '<param name="AutoLoop" value="False" />'; vlc_html += '<param name="AutoPlay" value="False" />'; vlc_html += '<param name="Volume" value="50" />'; vlc_html += '</OBJECT>'; document.write(vlc_html); }
In the html, I just call this inline right where I want my VLC:

Code: Select all

<script language="Javascript">loadObject();</script>

zvona
Blank Cone
Blank Cone
Posts: 11
Joined: 30 Oct 2006 10:32
Location: Helsinki

Re: Writing VLC object with Javascript to trick IE

Postby zvona » 30 Oct 2006 13:38

I'd be surprised if nobody else noticed this problem, because it was pretty obvious when clicking the video to activate fullscreen.
I've currently struggling with this problem. Thank you for the loadObject() function you provided, albeit it didn't fix the problem in all test cases for IE6 / IE7.

If anyone is aware of an advanced solution, I'd highly appreciate of an example.
Zvona

tomakaze
New Cone
New Cone
Posts: 4
Joined: 13 Oct 2006 13:43
Location: Helsinki, Finland
Contact:

Postby tomakaze » 30 Oct 2006 13:50

You're welcome!

That is basically just a cheap trick for IE, discovered through trial and error. I haven't tested it in IE7 yet since I'm using mac usually, but it would be better if IE played a bit nicer, or at least if the vlc plugin could deal with being presented as a protected ActiveX object and then clicked on without losing the picture.

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

LoadObject trick

Postby Tappen » 01 Nov 2006 05:25

Microsoft had to cripple IE in this way because someone else (I forget who) owns the patent for the idea that you could put an object in a web page and have it automatically load and run.

Thank the software patent supporters.

tomakaze
New Cone
New Cone
Posts: 4
Joined: 13 Oct 2006 13:43
Location: Helsinki, Finland
Contact:

Postby tomakaze » 01 Nov 2006 08:08

Well isn't that special! :idea:

skytt
New Cone
New Cone
Posts: 2
Joined: 22 Nov 2006 17:40

Postby skytt » 23 Nov 2006 12:57

Hi guys,

I have a problem with the activate the active x object with realtime streaming. When I have the javascript that does that on, I get IE to crash maybe 40-50% of the time. I start the realtime streaming with a javascript function like this,

Code: Select all

function doGo() { var options = new Array(":input-repeat=0"); targetURL = 'http://xxx/axis-cgi/mjpg/video.cgi?resolution=560x420&compression=40&clock=1&date=1'; document.getElementById('vlc').addTarget(targetURL, options, 4+8, -666); }
I call this function after i have called the activate function.

If I just make a button or link with the call to the doGo function and not do that when the page is rendering it or turn off the activate x function everything works. But i need both functions so the stream doesnt stop when you want fullscreen.

Any help is appreciated
Robert

zvona
Blank Cone
Blank Cone
Posts: 11
Joined: 30 Oct 2006 10:32
Location: Helsinki

Postby zvona » 24 Nov 2006 10:57

I noticed the very same problem after installing 0.8.6. I installed back version 0.8.5 and now crashes are much more infrequent.

However the JS you're using is correct and should do the work.
Zvona

skytt
New Cone
New Cone
Posts: 2
Joined: 22 Nov 2006 17:40

Postby skytt » 24 Nov 2006 11:14

hi zvona,

I updated my vlc last night and that seems to have solved the problem for now.

Thank you for your answer.

/Robert

Yapadavaro
Blank Cone
Blank Cone
Posts: 22
Joined: 09 Nov 2006 09:49
Location: Annecy, France

Postby Yapadavaro » 01 Dec 2006 09:30

Hi all,

First problem : Fullscreen

If you launch the activex like that, it works :

Code: Select all

var _options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear", ":fullscreen=1"); document.vlc.addTarget(strToLoad, _options, 12, -666);
The activeX is launched in fullscreen.
To return in window mode, click 'f' or double click on the video.

The fullscreen have some problem with me to while using the fullscreen property, so I use this code :

Code: Select all

<input type="button" value="Fullscreen" onclick='var X = document.vlc.getVariable("key-fullscreen"); document.vlc.setVariable("key-pressed", X);'>
This method works fine.

For the activeX activation, i have browse the msdn site and found a very simple method :
the object must be declared in a outside file so :
Create a file.js with this code :

Code: Select all

document.write('<object '); document.write('classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" '); document.write('codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" '); document.write('width=640 height=480 '); document.write('name="vlc" events="True" VIEWASTEXT>>'); document.write('<param name="MRL" value="">'); document.write('<param name="ShowDisplay" value="False">'); document.write('<param name="AutoLoop" value="True">'); document.write('<param name="AutoPlay" value="False">'); document.write('<param name="AutoStart" value="False">'); document.write('<param name="Enable" value="False">'); document.write('<param name="Volume" value="100">'); document.write('</object>');
and call this file.js in your html page like this :

Code: Select all

<td> <script src="file.js"></script> </td>
You should never have to click on the video to activate it.

Hope this help.
Yap.
vlc v0.8.5 / ActiveX under IE 6 sp2


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 1 guest