Restarting an Adobe AIR application when using video

Posted at — Jun 29, 2012

An Adobe AIR application can restart itself, using the code found in this StackOverflow question. However, it does not seem to work always in our application. We are creating new NativeWindows to allow the user to detach a window from the main application window to support using multiple monitors. The problem seemed to be more frequent when windows were detached.

After more investigation, it seemed that not the detached windows, but the video playing the detached windows was the problem. We now first make sure we stop all video that is playing before we do the restart code. We are using the Video class in our application, so we stop it like this:

video.attachNetStream( null );

This way, the restarts of our application have become reliable.

If you want to be notified in the future about new articles, as well as other interesting things I'm working on, join my mailing list!
I send emails quite infrequently, and will never share your email address with anyone else.