4

I'm writing a conferencing portal using the open-source OpenMeetings, which is a Flash app that is compiled with OpenLaszlo. So, I have access to the SWF source code which is a mix of Laszlo markup and JavaScript, but not ActionScript.

The problem I am having is that when users navigate away from the app in Internet Explorer, their microphone remains connected and they can hear the other party/other party can hear them. This means IE is not properly destroying the Flash object.

I've had trouble reproducing this bug on my own system, but it does occur on my co-workers computer.

I have tried to use JavaScript to capture the unload event and set innerHTML to "", which removes the Flash object from the page, but again, the microphone etc remains connected.

This only happens with Internet Explorer. This is a major bug for our software, as we deal with education and hence a student remaining "on the line" without knowing could open us up to a lawsuit!

Dmitry S.
  • 113
  • 1
  • 8
  • We have a similar problem also. It works correctly on some machines, but not on others. We don't have access to the flash code, so we really need a solution in javascript. Any ideas? – Karl Jan 21 '10 at 17:42

5 Answers5

2

The option covered here seems to work best for us:
http://blog.vokle.com/index.php/2009/03/10/why-ie-doesnt-drop-flash-netconnections-netstreams-and-how-to-fix-it/
We also use the "removeSWF" function from SWFObject like so:

    <!--[if IE]>
    <script type="text/javascript">
        function cleanupForIE() {
            try {
                //get using the id of your swf instance
                var swf = document.getElementById('myswf');  
                swf.disconnect();
            } catch(e) {
                alert("Error on unload: " + e);
            }
            swfobject.removeSWF("flashContent");
        }
        window.attachEvent("onbeforeunload", cleanupForIE);
    </script>
    <![endif]-->  
Paul Gregoire
  • 9,715
  • 11
  • 67
  • 131
1

Technically it's possible to add that feature - if it has not been added yet. OpenMeetings is an Apache Incubator project now, just contact the developer through the mailing list, and they should be able to help you.

raju-bitter
  • 8,906
  • 4
  • 42
  • 53
1

Unfortunately, I cannot provide a link as it is an internal site.

It is just a simple embed src="..." in a div, and on unload I set div's innerHTML to "". This doesn't work any better than just closing the browser window, and I never have a reference directly to the embed object, just to its containing div. I feel like it may have something to do with the fact that the movie is still "Playing". Some search results on Google have people complaining of similar issues (FLV audio can still be heard after browser window is closed) and the fix seems to be explicitly stopping the movie from ActionScript. (and of course I don't have such control over the compiled movie, it's generated from OpenLaszlo)

Dmitry S.
  • 113
  • 1
  • 8
0

Are there any JavaScript references to the object that remain?

 //e.g.
 var conf = document.getElementById( 'mySWFObject' );

if so, does explicitly calling delete work?

 delete window.conf;

(Otherwise, can you post a link to the code/site and we can check it out?)

scunliffe
  • 62,582
  • 25
  • 126
  • 161
0

Maybe you can ask the person who does the OpenLaszlo development if they build in a destory method listening to the Removed From Stage event. There you explicit stop all playing.

thgie
  • 2,367
  • 1
  • 18
  • 28