ActiveX VLC 2.04

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
allenmoatallen
New Cone
New Cone
Posts: 1
Joined: 22 Oct 2012 21:15

ActiveX VLC 2.04

Postby allenmoatallen » 22 Oct 2012 21:22

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>

rgkluver
Blank Cone
Blank Cone
Posts: 13
Joined: 29 Jan 2013 13:08

Re: ActiveX VLC 2.04

Postby rgkluver » 30 Jan 2013 01:56

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests