onStateChanged
Callback for player state changes.
public void onStateChanged(int old_state, int new_state, Error error)
- Since
- Available since v4.4.0.
To listen for player state changes, you must first call registerObserver to register a player observer object.
Trigger Timing
This callback is triggered when the player state changes.
Parameters
- old_state
- The player state before the change. See PlayerState.
- new_state
- The current player state. See PlayerState. If the current state is
FAILED, you can get detailed error information through theerrorparameter. - error
- State or error information. See Error.