onStateChanged

Occurs when the player state changes.

public void onStateChanged(int old_state, int new_state, Error error){}
Since
v4.5.0

To monitor player events, you need to call registerObserver to register a player observer object.

Trigger timing

When the player state changes, the SDK triggers this callback the report the previous and current states.

Restrictions

None.

Parameters

old_state
The previous player state. See PlayerState.
new_state
The current player state. See PlayerState. If the current state is FAILED, you can get the detailed error information from the error parameter.
error
The state or error information: Error.