I have a flash-page where the user can play a movie. However, as a part of the navigation, the video hides when a user does other operations. When this happends I would like to rewind the movie and stop buffering (so bandwidth is ready for other operations). Do I need to reload the mediaplayer?
Also, how do I remove and destroy the mediaplayer, making it read for GC?
It is created like this, from Lee Brimelows tutorial:
_osmf = new MediaPlayerSprite();
_osmf.mediaPlayer.autoPlay = true;
_osmf.resource = new URLResource(_url);
For progressive videos, the best way to rewind and stop buffering is to set MediaPlayer.media to null. This will unload the media entirely, meaning that if you want to play it again, you'll need to set MediaPlayer.media to the previous MediaElement, and the video will need to redownload. For streaming videos, you could just call MediaPlayer.seek(0).
Regarding garbage collection, this thread has the details: