7 Replies Latest reply on May 1, 2013 9:41 AM by saariko

    clear stage video

    abeymg

      We have a video app, that has two instances of the OSMF video player class. Any one of them can be playing video at a given time, but not both together.

      We noticed that, when using StageVideo and switching from player 1 to player 2 to play a new video, we can see the last frame of the previous video. (presumably from the stageVideo instance of player 1). This happens despite us clearing the viewport rect of all available stageVideo instances by setting it to new Rectangle(0,0,0,0)

       

      What seems to be happening is that even though we clear the viewport rect, when OSMF re-inits the stageVideo instance, the frame from the prev video is visible for a brief instant.

       

      Is there a better way to clear out the stageVideo instances, or alternatively hide them etc?

       

      Thanks,

        • 1. Re: clear stage video
          pjsteele190 Level 1

          I am getting the same.

           

          Adobe AIR 3.3

          Android 4.0

           

          Any suggestions would be appreciated.

          • 2. Re: clear stage video
            ClaudioNW

            Hi

             

            I have noticed the same issue.The only way I found is to remove the sprite from the stage and to dispose properly all the elements needed to play the video,

             

            At this condition, no frame will appear again later.

             

             

             

            • 3. Re: clear stage video
              M0N5TERS

              Hi ClaudioNW,

               

              Could you explain a bit more please? Post an example perhaps? What do you mean by "dispose properly all the elements needed to play the video"?

               

              I am removing all elements I've added from the stage and setting variables back to Null, but still getting the same result. How did you solve this?

               

              Thanks for your help.

              • 4. Re: clear stage video
                JAXIMFLASH

                I'm just having this issue too. ClaudioNW, could you explain more?

                Monsters or abeymg, were you able to figure it out?

                • 5. Re: clear stage video
                  M0N5TERS Level 1

                  Nope, still no luck. I assume it's a bug, and we just have to wait for Adobe to fix it in the next version, hopefully.

                   

                  This is specific to Android 4.0, but there's a similar bug on iOS as well (5.1 and above): when playing video with stagevideo, it shows a brief zoom-in animation of the first frame before it starts playing. Not as bad as the Android bug, but still pretty annoying. I think these two issues may be related, so hopefully they're working on it...

                  • 6. Re: clear stage video
                    XIDA.de

                    I think the problem is still there :/

                    I tried the latest AIR SDK 3.6 beta

                    • 7. Re: clear stage video
                      saariko Level 1

                      A workaround i use:

                       

                      Hide the stageVideo and wait for StageVideoEvent.RENDER_STATE to show it (the second time!)

                       

                      I use a single netstream attached to a single stageVideo and i netStream.dispose() and hide the stageVideo when a video ends

                      and netStream.play(urlToVideo) when launching a new video.

                      I noticed StageVideoEvent.RENDER_STATE fires two times. on the first one the last video's frame still shows but on the second one the new video actually starts playing so it is then that I show the stageVideo