Destroy the Player with Android SDK
The Player instance can be automatically destroyed by the Android System garbage collector by setting the Player view to null or by removing all references to the Player.
However, in some cases, the Android garbage collector may take some time to run, you can manually destroy the Player using the destroy method .
After invoking PlayerView#destroy(), PlayerView object will become useless since the underlying Player is destroyed. All PlayerView method calls will then result in doing nothing except printing a log in Logcat to warn about illegal usage of a destroyed Player:
“Tried to perform command with a destroyed player. Ignoring command.”
To invoke PlayerView#destroy() method, simply call it:
playerView.destroy()Updated 18 days ago
