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();
}
}
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>