I’m trying to implement the vlc web plugin for all browsers.
The best i could get from now , it’s a fully working plugin on browsers like chrome and firefox and static plugin without any access to the javascript API in IE 9 and 8.
HTML :
<div class="span8" id="playerContainer">
<!--[if IE]>
<object
classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
id="vlcPlayer"
name="vlcPlayer"
events="True" width="800" height="450">
<param name="Src" value="" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="True" />
<param name="AutoPlay" value="True" />
<param name="Toolbar" value="false"></param>
</object>
<![endif]-->
</div>
here i include the plugin for IE this way because if i use a dynamic insert with javascript the plugin is forced to a width and height of 0px and is never been displayed.
JS :
function initVLC(width,height,stream)
{
var embed = "<div>Error loading plugin</div>";
if(! $.browser.msie) {
embed = '<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org"'+
'id="vlcPlayer"'+
'toolbar ="false"'+
'autoplay="yes" loop="yes" width="'+width+'" height="'+height+'"'+
'target="" style="margin-bottom: 40px;" />';
$('#playerContainer').html(embed);
}
updateStream(stream);
}
function updateStream(stream)
{
var vlc = null;
vlc = document.getElementById('vlcPlayer');
vlc.playlist.stop();
vlc.playlist.items.clear();
vlc.playlist.add(stream);
vlc.playlist.play();
}
On Chrome or firefox everything work fine.
On IE if i don’t call updateStream() the plugin is displayed , but as soon as i try to use the javascript API , the plugin disapear (present in DOM but not displayed) and nothing happen.
When i debug with IE9 the vlc object seems to be ok and no errors are displayed :

How can i use the JS API with IE 9 and 8 to init and update the stream played by vlc ?
Any working sample will be greatly appreciated
Note : I’m testing with vlc 2.0.5 on Win 7 64bits and my webpage have a html5 doctype
I have switched to FbVLC which is the vlc plugin using Firebreath.
It’s working great and just require a fallback on classic vlc on non Windows client.