VLC ActivX plugin not playing video in update IE9

霸气de小男生 提交于 2019-12-08 00:29:34

问题


I am using vlc ActiveX plugin on web browser IE9 to play video live streaming.

Its work perfect in IE8 but when I update browser from IE8 to IE9 than it not playing video file or live straming.

here is my code.

<object type="application/x-vlc-plugin" id="vlc" width="517" height="388" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921">
                    <param name="MRL" id="mrlVideo" value="" />
                    <param name="volume" value="50" />
                    <param name="autoplay" value="True" />
                    <param name="loop" value="false" />
                    <param name="fullscreen" value="false" />
                    <param name="wmode" value="transparent" />
                    <param name="toolbar" value="true" />
                    <param name="windowless" value="true" />
                </object>

and in javascript I am using these

 var vlc = document.getElementById("vlc");
        var options = new Array(":rtsp-tcp"); 
        var urlVideofile = "hppt://IP:portnumber/"
        var id = vlc.playlist.add(urlVideofile, null, options);
        vlc.playlist.playItem(id);

Here is attach image that showing what exactly error is coming

Any help is greatly appreciated

Thanks.


回答1:


JavaScript is case-sensitive. You need to access vlc.playlist (not vlc.Playlist), call vlc.playlist.add (not vlc.Playlist.Add) and vlc.playlist.play (not vlc.playlist.Play). IE9’s JavaScript engine is more standards-compliant than previous versions of IE, which may have allowed case-insensitive access to ActiveX/COM APIs.

Additionally, a bug was introduced in VLC 2.0.6 that breaks the ActiveX API, so you will need to use VLC 2.0.5 or earlier. (Despite what is stated in #8627, this issue is not fixed in VLC 2.0.7, which appears to still include the 2.0.6 ActiveX plugin for some reason.)




回答2:


We have found the solutions as

//var options = [":rtsp-tcp"]; //commented out

//replace the line above with this.Note the CSA key is pre-pended with:
var options = [":ts-csa-ck="+EncryptionkeyValue]; 

//options.push("ts-csa-ck=EncryptionkeyValue");  //commented out as its above now
var itemId = vlc.playlist.add(targetURL, "", options); // continue as normal
var id = vlc.playlist.add(urlVideofile, null, options);
vlc.playlist.playItem(id);

Its working fine for Browsers including IE8 which have highest version, IE9, IE10 , Chrome, and FF.

Thanks



来源:https://stackoverflow.com/questions/17362451/vlc-activx-plugin-not-playing-video-in-update-ie9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!