I have an app that uses two instances of the MediaPlayer. One plays content, the other plays ad. They never play simultaneously, but for various reason we need to have 2 instances.
When I use stageVideo, I notice that when switching between the content to ad playback, I briefly get a glimpse of the stageVideo instance associated with the content player, and then I see the stageVideo instance associated with the ad playback..and vice-versa.
My guess is, this happens because internally OSMF, tries to use a different stageVideo instance for each player.
My question, is there a way to force it to reuse the same StageVideo instance for both players?
You can release the stage video instance by setting the visible property to false on the VideoSurface instance that is currently using it.
It may be interesting to check the underlying implementation, see http://sourceforge.net/adobe/osmf/svn/2432/tree/osmf/trunk/framework/OSMF/org/osmf/media/v ideoClasses/ .
Hope this helps,
Thanks for the tip.
I looked into using the visible property. it almost works, but I see the video turn green with artifactsfor a few seconds occasionally when the visible property is toggled on an existing video surface.