You can reset, reuse, or release a MediaPlayer instance that you no longer need.
When you reset a MediaPlayer instance, it is returned to its uninitialized IDLE state as defined in MediaPlayerStatus.
This operation is useful in the following cases:
You want to reuse a
MediaPlayer instance but need to load a new
MediaResource (video content) and replace the previous instance.
Resetting allows you to reuse the
MediaPlayer instance without the overhead of releasing resources, recreating the
MediaPlayer, and reallocating resources. The
replaceCurrentResource methods automatically do these steps for you, without having to call the reset method.
MediaPlayer has an ERROR status and needs to be cleared.
This is the only way to recover from the ERROR status.
reset to return the
MediaPlayer instance to its uninitialized state:
MediaPlayer.replaceCurrentResource to load another
To clear an error, load the same
When you receive the the
MediaPlaybackStatusChangeEvent.STATUS_CHANGED with the
PREPARED status, start the playback.