Multiple embedded VLC plugins in Firefox

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
giovortu
New Cone
New Cone
Posts: 1
Joined: 20 Dec 2006 14:16

Multiple embedded VLC plugins in Firefox

Postby giovortu » 20 Dec 2006 15:02

I've some trouble embedding more than one vlc controls in a web page using Mozilla Firfox.
Browser always crash; has anyone experienced the same problem?

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 02 Jan 2007 16:18

yes, there is a reentrancy problem in VLC core code; which affects multiple instance the ActiveX and Mozilla plugins.
I would suggest that you create each plugin instance sequentially through javascript; and avoid using hard-coded <OBJECT> or <EMBED> in your HTML page.

ngybi123
New Cone
New Cone
Posts: 9
Joined: 12 Jul 2005 10:09

Postby ngybi123 » 16 Jan 2007 03:48

yes, there is a reentrancy problem in VLC core code; which affects multiple instance the ActiveX and Mozilla plugins.
I would suggest that you create each plugin instance sequentially through javascript; and avoid using hard-coded <OBJECT> or <EMBED> in your HTML page.
Ok thanks for the advice. I have been having trouble with this for a long time as well. Do you have any sample code or reference as to how I can create each plugin instance sequentially through javascript? Thanks!

mloiaco
New Cone
New Cone
Posts: 2
Joined: 30 Jan 2007 21:25

Postby mloiaco » 30 Jan 2007 21:33

In addition to creating multiple VLC objects on the same page, the error also appears when you host multiple web browsers and each browser loads a page with a single VLC object embedded in it. So I doubt that solving the problem is as easy as "creating each plugin instance sequentially through javascript."

For example, my application hosts 4 web browser controls. I have also created 4 html pages (one for each web browser control). Each html page hosts a single VLC ActiveX control, and each html pages creates its single VLC instance through javascript.

When my application launches, the 4 web browser controls simultaneously navigate to their respective html pages - remember, each page contains a single VLC control. My application crashes when I start it.

When I only let the applicaiton navigate to one of the html pages (e.g. the other three web browser controls do not navigate to their respective pages), the error does not occur.


Are there any updates regarding this bug in VLC?

xiaobei
Blank Cone
Blank Cone
Posts: 26
Joined: 01 Feb 2007 06:28
Contact:

0.8.6 plugin problem

Postby xiaobei » 01 Feb 2007 07:07

yes, there is a reentrancy problem in VLC core code; which affects multiple instance the ActiveX and Mozilla plugins.
I would suggest that you create each plugin instance sequentially through javascript; and avoid using hard-coded <OBJECT> or <EMBED> in your HTML page.
Hi all:
evn: linux(server),Windows px(client),0.7 IE,0.8.6 plugin.
I want to Windows http view video. I put the compiled axvlc.dll in the path of "/usr/share/vlc/http/axvlc.dll ".In the "javascript":
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://192.168.100.1:8080/axvlc.dll" width="400" height="241" align="middle"
id="vlc"
events="True">
<param name="MRL" value="" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="False" />
<param name="Volume" value="50" />
<param name="StartTime" value="0" />
<embed src="" type="application/x-vlc-plugin" width="400" height="241" progid="VideoLAN.VLCPlugin.2" loop="False" align="middle" showdisplay="True" autoplay="False" name="vlc" id="vlc"></embed>
</OBJECT>
When I browse the http ,it hints "'playlist' null or not an object".In addition,I find the axvlc.dll dose not being downloaded to the Windows.
Maybe I think something is wrong in the <embed>...</embed>.
Anybody can help me ? Thanks!

gfts
Blank Cone
Blank Cone
Posts: 10
Joined: 12 Feb 2007 12:46

Re: Multiple embedded VLC plugins in Firefox

Postby gfts » 14 Mar 2007 15:59

I've some trouble embedding more than one vlc controls in a web page using Mozilla Firfox.
Browser always crash; has anyone experienced the same problem?
I am not sure about firefox, but this works great with my internet explorer

<body><center>
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
codebase="http://192.168.0.1/axvlc.cab"
width="640" height="480" id="vlc" events="True">
<param name="Src" value="udp:@239.255.1.20:1234" />
<param name="ShowDisplay" value="False" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
</OBJECT>
<br><p>
<table border="0" width="100%">
<tr>
<td width="33%" align="right">
<a href="javascript:;" onclick='document.vlc.play()'><img src="E:/upload/vlc/play.jpg" width="70" height="16" border="0" alt="Play Video"></a>
</td>
<td width="33%" align="center">
<!--a href="javascript:;" onclick='document.vlc.pause()'><img src="E:/upload/vlc/pause.jpg" width="70" height="16" border="0" alt="Pause Video"></a-->
</td>
<td width="33%" align="left">
<a href="javascript:;" onclick='document.vlc.stop()'><img src="E:/upload/vlc/stop.jpg" width="70" height="16" border="0" alt="Stop Video"></a>
</td>
</tr>
</table>
</center>
</body>

antonis123
New Cone
New Cone
Posts: 1
Joined: 25 Sep 2007 10:08

Re: Multiple embedded VLC plugins in Firefox

Postby antonis123 » 25 Sep 2007 10:28

Hello,
I was wondering if anyone had a closer look into the VLC code regarding this issue. I basically need to use 2-3 instances of the VLC plugin
inside a webpage and I plan to dig deeper into the code. If anyone has more insight regarding the actual problem I would be willing to work on
it.

Many thanks

ABNormal
New Cone
New Cone
Posts: 9
Joined: 12 Jul 2007 16:53

Re: Multiple embedded VLC plugins in Firefox

Postby ABNormal » 25 Oct 2007 00:43

i found your error:

<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://192.168.100.1:8080/axvlc.dll" width="400" height="241" align="middle"
id="vlc"
events="True">
<param name="MRL" value="**STREAM**" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="False" />
<param name="Volume" value="50" />
<param name="StartTime" value="0" />
<embed src="" type="application/x-vlc-plugin" width="400" height="241" progid="VideoLAN.VLCPlugin.2" loop="False" align="middle" showdisplay="True" autoplay="False" name="**STREAM**" id="vlc"></embed>
</OBJECT>

you forgot to repeat, in the embedded part, the name of the stream. so that worked only in explorer, not in firefox. now in both. try.
ABN

ABNormal
New Cone
New Cone
Posts: 9
Joined: 12 Jul 2007 16:53

Re: Multiple embedded VLC plugins in Firefox

Postby ABNormal » 25 Oct 2007 00:47

into second script:
<OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
codebase="http://192.168.0.1/axvlc.cab"
width="640" height="480" id="vlc" events="True">
<param name="Src" value="udp:@239.255.1.20:1234" />
<param name="ShowDisplay" value="False" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
</OBJECT>
there is an error (for firefox users): there is NO embedded part in it. so it can be used only in explorer.
does anyone know the right embedded formula for this object, please? is it the same (i dont think so) of the previous one?

krd
New Cone
New Cone
Posts: 4
Joined: 01 Nov 2007 16:59

Re: Multiple embedded VLC plugins in Firefox

Postby krd » 01 Nov 2007 17:03

Has there been any fix to this issue? I don't quite think I understood the suggestions about using javascript to avoid the embedded objects. I tried following the mozilla sample, but didn't have much luck. Any tips?

I am trying to open two video streams using the Mozilla plug-in, and it is exhibiting the same crashing problem described earlier in this thread.

This is my code:

<html>
<head><title>Demo of VLC mozilla plugin</title></head>

<body>

<h1>Demo of VLC mozilla plugin - Example 1</h1>

<table border=1>

<!-- ROW 1 -->
<tr><td>
<embed type="application/x-vlc-plugin"
name="video1"
autoplay="no" loop="yes" width="200" height="150"
target="udp://@225.225.225.224" />
</td>
<td>
<embed type="application/x-vlc-plugin"
name="video2"
autoplay="no" loop="yes" width="200" height="150"
target="udp://@225.225.225.224" />
</td>
<td>
</tr>
<tr><td>
<a href="javascript:;" onclick='document.video1.play()'>Play video1</a>
<a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a>
<a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a>
<a href="javascript:;"

onclick='document.video1.fullscreen()'>Fullscreen</a>
</td>
<td>
<a href="javascript:;" onclick='document.video2.play()'>Play video2</a>
<a href="javascript:;" onclick='document.video2.pause()'>Pause video2</a>
<a href="javascript:;" onclick='document.video2.stop()'>Stop video2</a>
<a href="javascript:;"

onclick='document.video2.fullscreen()'>Fullscreen</a>
</td>
<td>
</tr>

</table>

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Re: Multiple embedded VLC plugins in Firefox

Postby divx118 » 01 Nov 2007 17:48

By using javascript he means using a function wich dynamicly writes (document.write) the object in the page.
If you don't know how to do it i can create a little example for you.

Maurice 8)

krd
New Cone
New Cone
Posts: 4
Joined: 01 Nov 2007 16:59

Re: Multiple embedded VLC plugins in Firefox

Postby krd » 01 Nov 2007 17:56

By using javascript he means using a function wich dynamicly writes (document.write) the object in the page.
If you don't know how to do it i can create a little example for you.

Maurice 8)
A simple example would be much, much appreciated.

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Re: Multiple embedded VLC plugins in Firefox

Postby divx118 » 01 Nov 2007 20:45

Ok, but i must warn you i haven't tested it myself, because i have no mozilla based browser installed at the moment.

First the htm page:

Code: Select all

<html> <head><title>Demo of VLC mozilla plugin</title> <script src="buildVLCtable.js" type="text/javascript"></script> </head> <body onload="buildVLCtable();"> <h1>Demo of VLC mozilla plugin - Example 1</h1> <table id="vlcTable" border=1> </table> </body> </html>
and the js page (be sure to save this as buildVLCtable.js):

Code: Select all

function buildVLCtable() { var buildVLC = '<!-- ROW 1 --\>' +'<tr\><td\>' +'<embed type="application\/x-vlc-plugin"' +'name="video1"' +'autoplay="no" loop="yes" width="200" height="150"' +'target="udp:\/\/@225.225.225.224" \/\>"' +'<\/td\>' +'<td\>' +'<embed type="application\/x-vlc-plugin"' +'name="video2"' +'autoplay="no" loop="yes" width="200" height="150"' +'target="udp:\/\/@225.225.225.224" \/\>' +'<\/td\>' +'<td\>' +'<\/tr\>' +'<tr\><td\>' +'<a href="javascript:;" onclick="document.video1.play()"\>Play video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.pause()"\>Pause video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.stop()"\>Stop video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.fullscreen()"\>Fullscreen<\/a\>' +'<\/td\>' +'<td\>' +'<a href="javascript:;" onclick="document.video2.play()"\>Play video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.pause()"\>Pause video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.stop()"\>Stop video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.fullscreen()"\>Fullscreen<\/a\>' +'<\/td\>' +'<td\>' +'<\/tr\>' document.all.vlcTable.innerHTML=buildVLC }
If the above doesn't work then you can do it like this:
The htm page:

Code: Select all

<html> <head><title>Demo of VLC mozilla plugin</title> <script src="buildVLCtable.js" type="text/javascript"></script> </head> <body> <h1>Demo of VLC mozilla plugin - Example 1</h1> <table id="vlcTable" border=1> <script language="javascript">buildVLCtable();</script> </table> </body> </html>
and the js page (be sure to save this as buildVLCtable.js):

Code: Select all

function buildVLCtable() { var buildVLC = '<!-- ROW 1 --\>' +'<tr\><td\>' +'<embed type="application\/x-vlc-plugin"' +'name="video1"' +'autoplay="no" loop="yes" width="200" height="150"' +'target="udp:\/\/@225.225.225.224" \/\>"' +'<\/td\>' +'<td\>' +'<embed type="application\/x-vlc-plugin"' +'name="video2"' +'autoplay="no" loop="yes" width="200" height="150"' +'target="udp:\/\/@225.225.225.224" \/\>' +'<\/td\>' +'<td\>' +'<\/tr\>' +'<tr\><td\>' +'<a href="javascript:;" onclick="document.video1.play()"\>Play video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.pause()"\>Pause video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.stop()"\>Stop video1<\/a\>' +'<a href="javascript:;" onclick="document.video1.fullscreen()"\>Fullscreen<\/a\>' +'<\/td\>' +'<td\>' +'<a href="javascript:;" onclick="document.video2.play()"\>Play video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.pause()"\>Pause video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.stop()"\>Stop video2<\/a\>' +'<a href="javascript:;" onclick="document.video2.fullscreen()"\>Fullscreen<\/a\>' +'<\/td\>' +'<td\>' +'<\/tr\>' document.write(buildVLC); }
If you have any questions about the code just ask :D

Maurice 8)

krd
New Cone
New Cone
Posts: 4
Joined: 01 Nov 2007 16:59

Re: Multiple embedded VLC plugins in Firefox

Postby krd » 01 Nov 2007 21:27

Maurice --
Thanks, I definitely would not have figured that out myself without spending a long, long time on it.

Unfortunately, it still crashes if I set autoplay to yes or refresh the page a couple of times, but maybe I can fool around with the javascript a little bit to get somewhere.

I have only tried this on Windows, and I'm really more concerned about getting it to work on linux, but I expect it to go about the same. Hmmm...

krd
New Cone
New Cone
Posts: 4
Joined: 01 Nov 2007 16:59

Re: Multiple embedded VLC plugins in Firefox

Postby krd » 02 Nov 2007 17:57

Are people seeing this same problem when using a linux Firefox plugin, or only with Windows?

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Re: Multiple embedded VLC plugins in Firefox

Postby divx118 » 02 Nov 2007 19:38

Are people seeing this same problem when using a linux Firefox plugin, or only with Windows?
I don't know for the firefox plugin but in windows ie the plugin crashes also when your only using one object if you refresh the page multiple times. The autoplay issue you mentioned is easy to be solved using a setTimeout in the onload of the body tag and calling a function that starts the video.

Maurice

paries
New Cone
New Cone
Posts: 1
Joined: 25 Nov 2007 18:02

Re: Multiple embedded VLC plugins in Firefox

Postby paries » 25 Nov 2007 18:54

Hi,

Is this problem resolved. I also need to have 4 plugins on single page, when refreshed it crashes on IE also. Any solution? What is the correct way to have multiple plugins on single page, or is a bug in vlc.
urgent help required.

xiaobei
Blank Cone
Blank Cone
Posts: 26
Joined: 01 Feb 2007 06:28
Contact:

Why can not stream 8M UDP ?

Postby xiaobei » 14 Dec 2007 09:57

Hi,everyone
I am puzzled with by a strange phenomena.When I use the command as: vlc -vvv v4l:/dev/video0:channel=1:norm=pal:size=720x576:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=mp2v,vb=8192,scale=1,fps=30,deinterlace=0,threads=1,acodec=mpga,ab=128,interlace=Bob,channels=2}:duplicate{dst=std{access=udp,mux=ts,url=227.0.0.1:1234}}' ,I find only about 3M flux in my LAN.there is many warnings as:
access_output_udp private warning:send error:Resource temporarily unavailable
But if I use vb=4096,there is about 4M in my LAN,it is right.
Could someone explain the Phenomenon for me ???
Thanks!
xiaobei

mottrobe
New Cone
New Cone
Posts: 1
Joined: 03 Jan 2008 21:59

Re: Multiple embedded VLC plugins in Firefox

Postby mottrobe » 03 Jan 2008 22:04

Indeed, with Mandriva 10 on Firefox 2.0.0.11, a refresh on a page with the vlc embedded plugin will terminate the browser. I'll test on Fedora Core 7 with the same version of Firefox.

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Multiple embedded VLC plugins in Firefox

Postby revolunet » 04 Jan 2008 09:59

I have the same problem on xp sp2/vlc 0.8.6d

and, with Internet Explorer, dynamic javascript loading of the activex is impossible, i dont know why... do somebody knows ?

thanx
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

hybrid_00
New Cone
New Cone
Posts: 2
Joined: 09 Aug 2007 13:03

Re: Multiple embedded VLC plugins in Firefox

Postby hybrid_00 » 21 Jan 2008 15:34

I have the same problem on xp sp2/vlc 0.8.6d

and, with Internet Explorer, dynamic javascript loading of the activex is impossible, i dont know why... do somebody knows ?

thanx
It is possible, I just worked on it, the problem is that after loading the activex, it sets its size automatically to width:0px and height:0px... no idea why...
My workout was to wait until the plugin is loaded (document.readyState=='complete') and then set the size of the activex (document.getElementById([yourVLCid]).style.height='[value]px', the same for the width). Now your activex is here - magic :P

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Multiple embedded VLC plugins in Firefox

Postby revolunet » 25 Jan 2008 11:57

hybrid_00, thanx so much it works dude !!

i will update my small js lib : http://code.revolunet.com/VLCjs to integrate this trick ;)

THANX
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

lucasmartino
Blank Cone
Blank Cone
Posts: 24
Joined: 02 Jan 2008 20:28
VLC version: 0.8.6
Operating System: Windows/Linux

Re: Multiple embedded VLC plugins in Firefox

Postby lucasmartino » 25 Jan 2008 15:54

Hi,
i have the same problem. Can you show me your solution? I'm using vlc version 0.8.6d

thanks,

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Multiple embedded VLC plugins in Firefox

Postby revolunet » 25 Jan 2008 16:08

hi

my solution for Internet Explorer is :

Code: Select all

function loadVLC() { var html = '<object id="vlc" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"></object>'; var target_div = document.getElementById("target_div"); target_div.innerHTML = html; target_div.firstChild.style.width = "320px"; target_div.firstChild.style.height= "240px"; }
this must be executed after page onload.

(For Mozilla its easyer, no need to specify width and height)

i use 0.8.6c

i used this trick to make VLCobject js library : http://code.revolunet.com/VLCobject/EN
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

lucasmartino
Blank Cone
Blank Cone
Posts: 24
Joined: 02 Jan 2008 20:28
VLC version: 0.8.6
Operating System: Windows/Linux

Re: Multiple embedded VLC plugins in Firefox

Postby lucasmartino » 25 Jan 2008 19:50

Can you create more than one vlc plugins in the same page?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests