3 Replies Latest reply on Sep 16, 2010 3:52 PM by chris.campbell

    Video Freezes in Air vs Flash

    ApolloX2

      We have an application that we are migrating from Flash to Air 2 and we've been having serious issues with playing FLV video via the VideoDisplay class.  The application contains a revolving video slideshow that loads a set of 10 movies, one at a time.  The application can run fine for hours at a time in Flash, but in Air the same code locks up in a few hours.  The behavior is that the application itself does not freeze, but the VideoDisplay window locks as if it was paused.  No messages sent to the window (such as play()) seem to be able to recover.

       

      We've also had similar issues on different hardware where after only 10 minutes of running Air the video will grind to a halt, showing a handful of frames over a minute, then completely recover.  Again, this is a behavior we never saw in the same application in Flash.

       

      Are there known issues that would cause such poor performance in Air 2 vs Flash?

        • 1. Re: Video Freezes in Air vs Flash
          chris.campbell Adobe Employee

          Hi,

          None that I know of, but I'll be circling around with our video experts to see if they have any ideas.  Does this occur on all platforms?  Does it happen with under the debugger, installed with a 2.0.3 runtime, both?  On the machines where it occurs quickly, can you give me hardware specifics?  Finally, is it possible to get access to your application so we can test it internally? 

           

          Please feel free to contact me at ccampbel@adobe.com.  If you send an attachment, please remove the extension so it can get past our email filters.

           

          Thanks,

          Chris

          • 2. Re: Video Freezes in Air vs Flash
            ApolloX2 Level 1

            To perhaps simplify the issue, assume the is a display object (Canvas) called "player".  Then assume the following code is executed in such a way that it loads one video at a time in some kind of loop.  For example, it plays the same 10 videos over and over again.  Is there anything you can see that would be causing a memory leak for how the video is loaded and unloaded:

             

            private var currentVideoPlaying:VideoDisplay;
            private function playVideo(filePath:String):void {
                currentVideoPlaying = new VideoDisplay();
                myVideoDisplay.maintainAspectRatio = true;
                myVideoDisplay.percentHeight = 100;
                myVideoDisplay.percentWidth = 100;
                myVideoDisplay.source = filePath;
                myVideoDisplay.volume = 0.5;
                myVideoDisplay.bufferTime = 1;
                myVideoDisplay.addEventListener(VideoEvent.COMPLETE, videoCompleteHandler);
                myVideoDisplay.addEventListener(VideoEvent.STATE_CHANGE,videoErrorHandler);
                this.player.addChild(currentVideoPlaying);
            }


            private function videoCompleteHandler(inEvent:VideoEvent):void {
                // Shutdown currently running video
                player.removeChild(currentVideoPlaying);
                currentVideoPlaying.close();
                currentVideoPlaying.source = "";
                currentVideoPlaying = null;
                player.removeAllChildren();


                // Load new content
               
            playVideo(...);
            }

            • 3. Re: Video Freezes in Air vs Flash
              chris.campbell Adobe Employee

              I've responded to this via email, but for those following along one thing to try is to call currentVideoPlaying.removeEventListener() in videoCompleteHandler() for each addEventLister() that was previously added.

               

              Chris