Agora Java API Reference for Android
|
Public Member Functions | |
long | getNativeHandle () |
void | onStateChanged (int old_state, int new_state, Error error) |
void | onPositionChanged (long curr_time, long utc_time) |
void | onResolutionChanged (int width, int height) |
void | onEvent (int event) |
void | onMetadata (int type, byte[] data) |
void | onPlayerInfoUpdated (PlayerInfo info) |
void | onAudioVolumeIndication (int volume) |
Protected Member Functions | |
void | finalize () |
void io.agora.rte.PlayerObserver.onStateChanged | ( | int | old_state, |
int | new_state, | ||
Error | error | ||
) |
Player state callback. This function is called when the player state changes.
old_state | The previous state. |
new_state | The new state. |
error | Possible ErrorCode returns. Only when the new_state value corresponds to Constants.PlayerState.FAILED, you need to check the value of this parameter.
|
void io.agora.rte.PlayerObserver.onPositionChanged | ( | long | curr_time, |
long | utc_time | ||
) |
Playback position change callback.
void io.agora.rte.PlayerObserver.onResolutionChanged | ( | int | width, |
int | height | ||
) |
Video resolution change callback.
width | The width of the video frame. |
height | The height of the video frame. |
void io.agora.rte.PlayerObserver.onEvent | ( | int | event | ) |
Event callback.
event | The event notified by the callback. Refer to Constants.PlayerEvent type. Currently, the following events can be handled accordingly:
|
void io.agora.rte.PlayerObserver.onMetadata | ( | int | type, |
byte[] | data | ||
) |
Metadata callback.
type | The type of metadata. |
data | The metadata buffer. |
void io.agora.rte.PlayerObserver.onPlayerInfoUpdated | ( | PlayerInfo | info | ) |
Player information update callback. This is called when fields in PlayerInfo are updated.
info | The current PlayerInfo information. |
void io.agora.rte.PlayerObserver.onAudioVolumeIndication | ( | int | volume | ) |
Broadcaster audio volume update callback.
volume | The current volume of the Broadcaster. The value range is [0, 255]. |