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!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: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.
I am not sure about firefox, but this works great with my internet explorerI'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?
A simple example would be much, much appreciated.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
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>
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
}
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>
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);
}
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.Are people seeing this same problem when using a linux Firefox plugin, or only with Windows?
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...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
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";
}
Users browsing this forum: No registered users and 9 guests