ActiveX problems in IE

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Jack L
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Jul 2006 16:00
Contact:

ActiveX problems in IE

Postby Jack L » 19 Jul 2006 05:03

I am using the activex plugin in IE to display 2 videos and have run into a couple of problems.

1. At times when closing the browser an error will appear. This also happens at times when I refresh the screen. I think it may be related to shared memory between the two instances of the plugin object, but I am not sure. Any ideas?

2. My HTML code starts playback of a video stream (multicast) but when the user moves the mouse over the plugin it tells them to click to activate. When they do the video disappears. What can I do to deactivate this "feature"?

3. I have been reading all the documentation I can find but I am confused. I am trying to find out what controls there are that I can use. I can find the methods but I cannot find a list of variables. Can anyone help.

Thanks in advance everyone.

krsna

mouseover activation

Postby krsna » 23 Jul 2006 23:32

The #2 items sounds similar to a "feature" of zonealarm - part of the zonealarm Privacy settings. If your user has zonealarm or another firewall, might be worth having them turn it off to test.

krsna

ActiveX changes by MS

Postby krsna » 24 Jul 2006 00:34


Jack L
Blank Cone
Blank Cone
Posts: 15
Joined: 12 Jul 2006 16:00
Contact:

Postby Jack L » 24 Jul 2006 02:39

krsna,

Thanks for the reply. The article was interesting but I don't think think your question on interfering programs causing problems is the case here. The machines in question are not running any special software like you mention. My tests make me believe that my problem is due to trying to do something with the control before both of them have fully loaded.

One think I have done is move to using Microsofts .HTA approach (hypertext application). By changing the extension and adding a line in the html page it causes the system to treat the web page as an application.

It took away the problem of the video disappearing with a click, and appears to behave better this way.

The code I have displays 2 videos and allows you to switch between audio 1 and audio 2. Since I have seen some questions from people on how to do this here is the code to do it. Copy this code to a file with an .HTA extension and run it just like any executable. When you run it this code looks for 3 parameters - 2 IP addresses and text for the window. It is pretty simple to edit to do what you want. Hope it helps someone.



Code: Select all

<HTML> <head> <title>Playback</title> <HTA:APPLICATION ID="LEPViewer" APPLICATIONNAME="VIEW" BORDERSTYLE="complex" BORDER="dialog" CAPTION="yes" SHOWINTASHBAR="yes" MAXIMIZEBUTTON="no" MINIMIZEBUTTON="no" scroll="no"> </head> <SCRIPT LANGUAGE='javascript'> var IPAddress1 = ""; var IPAddress2 = ""; var RecordPathNum = ""; function play() { document.v1.playlistClear(); document.v2.playlistClear(); //Below code 8 replaces the playlist and starts playing document.v1.addTarget(IPAddress1, null, 8, 0); document.v2.addTarget(IPAddress2, null, 8, 0); setTimeout('Listen2V2()', 900); setTimeout('Listen2V1()', 1000); resizeTo(335,630); moveTo(670,0); } function Closeobj() { //document.v1.stop(); //document.v2.stop(); } function Listen2V1() { document.v2.volume = "0"; document.v1.volume = "100"; } function Listen2V2() { document.v1.volume = "0"; document.v2.volume = "100"; } </SCRIPT> </HEAD> <BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" onload="play()" onunload="Closeobj()" BGCOLOR="AAAAAA" > <SCRIPT LANGUAGE='javascript'> var argc = 0; var arg = null; var cmdLine = LEPViewer.commandLine; var strlength = cmdLine.length; var poshta = cmdLine.indexOf(".hta"); poshta = poshta + 7; var newstrlen = strlength - poshta; cmdLine = cmdLine.substring(poshta, strlength); cmdLine = cmdLine.replace(" ", " "); var argv = cmdLine.split(" "); IPAddress1 = argv[0]; IPAddress2 = argv[1]; RecordPathNum = argv[2]; IPAddress1 = IPAddress1.replace(",", ""); IPAddress2 = IPAddress2.replace(",", ""); IPAddress1 = "udp://@" + IPAddress1 + ":1234"; IPAddress2 = "udp://@" + IPAddress2 + ":1234"; RecordPathNum = "Record Path " + RecordPathNum; document.write('<center><font face="Tahoma" size=+1 color="005555"><B>'); document.write(RecordPathNum + ' - <font size="+2">Playback C</B></CENTER>'); </SCRIPT> <OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width=320 height=240 id="v1" events="True"> <param name="ShowDisplay" value="True"/> <param name="AutoPlay" value="True"/> <param name="Enabled" value="False" /> <param name="Volume" value="100"> </OBJECT> <BR> <SCRIPT LANGUAGE='javascript'> document.write('<center><font face="Tahoma" size=+1 color="550055"><B>'); document.write(RecordPathNum + ' - <font size="+2">Playback D</B></CENTER>'); </SCRIPT> <OBJECT classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="320" height="240" id="v2" events="True"> <param name="ShowDisplay" value="True"/> <param name="AutoPlay" value="True"/> <param name="Enabled" value="True" /> <param name="Volume" value="0"> </OBJECT> <CENTER> <form name="Formular" action=""> <font face="Tahoma" color="002222" size="+2"><B>Audio: </B></font> <font face="Tahoma" color="005555" size="2">Playback <B><font size=6>C</B> <input type="radio" name="AudioSource" value="AudioMain" checked onClick="Listen2V1()"> <font face="Tahoma" color="550055" size="2">Playback <font size="6">D</font> <input type="radio" name="AudioSource" value="AudioBackup" onClick="Listen2V2()"> </form> </CENTER> </BODY> </HTML>
[/code]


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 71 guests