Page 1 of 2

Multiple embedded VLC plugins in Firefox

Posted: 20 Dec 2006 15:02
by giovortu
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?

Posted: 02 Jan 2007 16:18
by Quovodis
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.

Posted: 16 Jan 2007 03:48
by ngybi123
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!

Posted: 30 Jan 2007 21:33
by mloiaco
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?

0.8.6 plugin problem

Posted: 01 Feb 2007 07:07
by xiaobei
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!

Re: Multiple embedded VLC plugins in Firefox

Posted: 14 Mar 2007 15:59
by gfts
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>

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Sep 2007 10:28
by antonis123
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Oct 2007 00:43
by ABNormal
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Oct 2007 00:47
by ABNormal
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?

Re: Multiple embedded VLC plugins in Firefox

Posted: 01 Nov 2007 17:03
by krd
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>

Re: Multiple embedded VLC plugins in Firefox

Posted: 01 Nov 2007 17:48
by divx118
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)

Re: Multiple embedded VLC plugins in Firefox

Posted: 01 Nov 2007 17:56
by krd
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.

Re: Multiple embedded VLC plugins in Firefox

Posted: 01 Nov 2007 20:45
by divx118
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)

Re: Multiple embedded VLC plugins in Firefox

Posted: 01 Nov 2007 21:27
by krd
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...

Re: Multiple embedded VLC plugins in Firefox

Posted: 02 Nov 2007 17:57
by krd
Are people seeing this same problem when using a linux Firefox plugin, or only with Windows?

Re: Multiple embedded VLC plugins in Firefox

Posted: 02 Nov 2007 19:38
by divx118
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Nov 2007 18:54
by paries
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.

Why can not stream 8M UDP ?

Posted: 14 Dec 2007 09:57
by xiaobei
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 03 Jan 2008 22:04
by mottrobe
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.

Re: Multiple embedded VLC plugins in Firefox

Posted: 04 Jan 2008 09:59
by revolunet
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 21 Jan 2008 15:34
by hybrid_00
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Jan 2008 11:57
by revolunet
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Jan 2008 15:54
by lucasmartino
Hi,
i have the same problem. Can you show me your solution? I'm using vlc version 0.8.6d

thanks,

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Jan 2008 16:08
by revolunet
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

Re: Multiple embedded VLC plugins in Firefox

Posted: 25 Jan 2008 19:50
by lucasmartino
Can you create more than one vlc plugins in the same page?