Skip navigation
Currently Being Moderated

clear stage video

May 10, 2011 1:23 PM

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,

 
Replies
  • P.J. Steele
    22 posts
    Sep 30, 2008
    Currently Being Moderated
    Jul 24, 2012 2:36 PM   in reply to abeymg

    I am getting the same.

     

    Adobe AIR 3.3

    Android 4.0

     

    Any suggestions would be appreciated.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2012 1:03 PM   in reply to P.J. Steele

    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.

     

    

     

     

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 10, 2012 2:55 PM   in reply to ClaudioNW

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 7, 2012 8:02 AM   in reply to M0N5TERS

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

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

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 7, 2012 8:52 AM   in reply to JAXIMFLASH

    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...

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 25, 2013 9:48 AM   in reply to M0N5TERS

    I think the problem is still there :/

    I tried the latest AIR SDK 3.6 beta

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2013 9:41 AM   in reply to XIDA.de

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points