reset
Resets the media player to its uninitialized state.
This method performs the following actions sequentially:
Clears the current data source
Releases resources associated with the current playback
Brings the player back to the idle state
After resetting, you must:
Call setDataSource to set a new data source
Call prepare or prepareAsync before starting playback again
Typical use cases:
Switching between different video sources
Recovering from playback errors
Releasing resources before reusing the player instance
Example usage:
player.reset() // Reset existing configuration
player.setDataSource("new_video.mp4") // Set new source
player.prepare() // Prepare for playback
player.play() // Start playbackNote:
Do NOT call this method within any CypressMediaPlayerCallback methods (e.g. onPrepared, onCompleted). This may cause deadlocks or unexpected state conflicts.
Return
true if the reset operation succeeded, false otherwise. A return value of false typically indicates: - The player is in an invalid state (already closed). - Internal resource release failed.
See also
For setting new data sources after reset
For asynchronous preparation
Throws
if called on an invalid player instance. Always check valid before invocation.