Restarting an Adobe AIR application when using video

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 );
video.clear();

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

Advertisements

One thought on “Restarting an Adobe AIR application when using video

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s