Page 1 of 1

ActiveX VLC 2.04

Posted: 22 Oct 2012 21:22
by allenmoatallen
Hi guys,

I am trying to stream video using the VLC webplugin. It works under Firefox/Chrome and I even use javascript to switch streams. This doesn't work under IE and ActiveX.

If I place a src file in the object tag for IE then I can start 1 stream but as soon as I try to play anything from the VLC playlist I create via javascript, no box for the stream even shows up in internet explorer. Below are some relevant code bits:

Javascript

Code: Select all

function WriteVLC() { window.vlc = document.getElementById("vlcplayer"); // for netscape plugin if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { document.write('<embed type="application/x-vlc-plugin" version="VideoLAN.VLCPlugin.2" pluginspage="http://www.videolan.org"'); document.writeln(' id="vlcplayer" width="640" height="480" toolbar="no">'); document.writeln('</embed>'); playList(); } else { // for IE ActiveX document.write('<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"'); document.writeln(' id="vlcplayer2" width="640" height="480">'); //document.writeln('<param name="Src" value="" />'); document.writeln('<param name="AutoPlay" value="true" />'); document.writeln('<param name="ShowDisplay" value="True" />'); document.writeln('<param name="toolbar" value="False" />'); document.writeln('</object>'); playList(); } }
HTML

Code: Select all

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Elections Cameras</title> <link rel="stylesheet" type="text/css" href="theme.css"> <script src="CameraTest.js" type="text/javascript"></script> </head> <body> <form>Select which camera to view: <select id="cameraList" onchange="changeCamera()"> <option>Camera 1</option> <option>Camera 2</option> <option>Camera 3</option> <option>Camera 4</option> <option>Camera 5</option> </select> </form> <script type="text/javascript"> WriteVLC(); </script> </body> </html>

Re: ActiveX VLC 2.04

Posted: 30 Jan 2013 01:56
by rgkluver
First of all you are defining window.vlc before it is created.

Also, is not the correct call for starting the playlist "vlc.playlist.play()" ? I can only guess that PlayList() is another function you made yourself? and without seeing it not sure if we can be very helpful.