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,
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.
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...
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
North America
Europe, Middle East and Africa
Asia Pacific