Tencent Cloud live player callback notification
Some V2TXLivePlayer callback notifications can be received, including the player status, playback volume callback, audio/video first-frame callback, statistics, warning, and error messages.
◆ com::tencent::live2::V2TXLivePlayerObserver
class com::tencent::live2::V2TXLivePlayerObserver |
Public Member Functions |
void | onError (V2TXLivePlayer player, int code, String msg, Bundle extraInfo) |
|
void | onWarning (V2TXLivePlayer player, int code, String msg, Bundle extraInfo) |
|
void | onVideoResolutionChanged (V2TXLivePlayer player, int width, int height) |
|
void | onConnected (V2TXLivePlayer player, Bundle extraInfo) |
|
void | onVideoPlaying (V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo) |
|
void | onAudioPlaying (V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo) |
|
void | onVideoLoading (V2TXLivePlayer player, Bundle extraInfo) |
|
void | onAudioLoading (V2TXLivePlayer player, Bundle extraInfo) |
|
void | onPlayoutVolumeUpdate (V2TXLivePlayer player, int volume) |
|
void | onStatisticsUpdate (V2TXLivePlayer player, V2TXLivePlayerStatistics statistics) |
|
void | onSnapshotComplete (V2TXLivePlayer player, Bitmap image) |
|
void | onRenderVideoFrame (V2TXLivePlayer player, V2TXLiveVideoFrame videoFrame) |
|
void | onReceiveSeiMessage (V2TXLivePlayer player, int payloadType, byte[] data) |
|
◆ onAudioLoading()
Audio loading event
- Parameters
-
player | Player object that calls back this notification |
extraInfo | Extended information |
◆ onAudioPlaying()
void onAudioPlaying |
( |
V2TXLivePlayer |
player, |
|
|
boolean |
firstPlay, |
|
|
Bundle |
extraInfo |
|
) |
| |
|
inline |
Audio playback event
- Parameters
-
player | Player object that calls back this notification |
firstPlay | Play for the first time |
extraInfo | Extended information |
◆ onConnected()
live player has successfully connected to the server notification
- Parameters
-
player | Player object that calls back this notification |
extraInfo | Extended information |
◆ onError()
void onError |
( |
V2TXLivePlayer |
player, |
|
|
int |
code, |
|
|
String |
msg, |
|
|
Bundle |
extraInfo |
|
) |
| |
|
inline |
live player error notification, which is called back when the player encounters an error
- Parameters
-
player | Player object that calls back this notification |
code | Error code V2TXLiveCode |
msg | Error message |
extraInfo | Extended information |
◆ onPlayoutVolumeUpdate()
Player playback volume callback.
- Attention
- This callback notification is received after V2TXLivePlayer#enableVolumeEvaluation(int) is called to enable playback volume display.
- Parameters
-
player | Player object that calls back this notification |
volume | Current playback volume |
◆ onReceiveSeiMessage()
void onReceiveSeiMessage |
( |
V2TXLivePlayer |
player, |
|
|
int |
payloadType, |
|
|
byte[] |
data |
|
) |
| |
|
inline |
Callback of receiving an SEI message. The sender calls sendSeiMessage
in V2TXLivePusher to send an SEI message.
- Attention
- You will receive this callback after calling
enableReceiveSeiMessage
in V2TXLivePlayer to enable the receiving of SEI
- Parameters
-
player | Player object that calls back this notification |
payloadType | The payload type of the received SEI message |
data | sei message data |
◆ onRenderVideoFrame()
◆ onSnapshotComplete()
Screenshot callback
- Parameters
-
player | Player object that calls back this notification |
image | Captured video image |
◆ onStatisticsUpdate()
Live player statistics callback.
- Parameters
-
◆ onVideoLoading()
Video loading event
- Parameters
-
player | Player object that calls back this notification |
extraInfo | Extended information |
◆ onVideoPlaying()
void onVideoPlaying |
( |
V2TXLivePlayer |
player, |
|
|
boolean |
firstPlay, |
|
|
Bundle |
extraInfo |
|
) |
| |
|
inline |
Video playback event
- Parameters
-
player | Player object that calls back this notification |
firstPlay | Play for the first time |
extraInfo | Extended information |
◆ onVideoResolutionChanged()
void onVideoResolutionChanged |
( |
V2TXLivePlayer |
player, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
inline |
live player resolution change notification
- Parameters
-
player | Player object that calls back this notification |
width | Video width |
height | Video height |
◆ onWarning()
void onWarning |
( |
V2TXLivePlayer |
player, |
|
|
int |
code, |
|
|
String |
msg, |
|
|
Bundle |
extraInfo |
|
) |
| |
|
inline |
live player warning notification
- Parameters
-
player | Player object that calls back this notification |
code | Warning code V2TXLiveCode |
msg | Warning message |
extraInfo | Extended information |