LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
V2TXLivePlayerObserver

Data Structures

class  V2TXLivePlayerObserver
 

Detailed Description

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.


Data Structure Documentation

◆ 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)
 

Member Function Documentation

◆ onAudioLoading()

void onAudioLoading ( V2TXLivePlayer  player,
Bundle  extraInfo 
)
inline

Audio loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onAudioPlaying()

void onAudioPlaying ( V2TXLivePlayer  player,
boolean  firstPlay,
Bundle  extraInfo 
)
inline

Audio playback event

Parameters
playerPlayer object that calls back this notification
firstPlayPlay for the first time
extraInfoExtended information

◆ onConnected()

void onConnected ( V2TXLivePlayer  player,
Bundle  extraInfo 
)
inline

live player has successfully connected to the server notification

Parameters
playerPlayer object that calls back this notification
extraInfoExtended 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
playerPlayer object that calls back this notification
codeError code V2TXLiveCode
msgError message
extraInfoExtended information

◆ onPlayoutVolumeUpdate()

void onPlayoutVolumeUpdate ( V2TXLivePlayer  player,
int  volume 
)
inline

Player playback volume callback.

Attention
This callback notification is received after V2TXLivePlayer#enableVolumeEvaluation(int) is called to enable playback volume display.
Parameters
playerPlayer object that calls back this notification
volumeCurrent 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
playerPlayer object that calls back this notification
payloadTypeThe payload type of the received SEI message
datasei message data

◆ onRenderVideoFrame()

void onRenderVideoFrame ( V2TXLivePlayer  player,
V2TXLiveVideoFrame  videoFrame 
)
inline

Custom video rendering callback

Attention
Need you call V2TXLivePlayer#enableObserveVideoFrame(boolean, V2TXLiveDef.V2TXLivePixelFormat, V2TXLiveDef.V2TXLiveBufferType) to turn on the callback switch.
Parameters
playerPlayer object that calls back this notification
videoFrameVideo frame data V2TXLiveVideoFrame

◆ onSnapshotComplete()

void onSnapshotComplete ( V2TXLivePlayer  player,
Bitmap  image 
)
inline

Screenshot callback

Parameters
playerPlayer object that calls back this notification
imageCaptured video image

◆ onStatisticsUpdate()

void onStatisticsUpdate ( V2TXLivePlayer  player,
V2TXLivePlayerStatistics  statistics 
)
inline

Live player statistics callback.

Parameters
playerPlayer object that calls back this notification
statisticsPlayer statistics V2TXLivePlayerStatistics

◆ onVideoLoading()

void onVideoLoading ( V2TXLivePlayer  player,
Bundle  extraInfo 
)
inline

Video loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onVideoPlaying()

void onVideoPlaying ( V2TXLivePlayer  player,
boolean  firstPlay,
Bundle  extraInfo 
)
inline

Video playback event

Parameters
playerPlayer object that calls back this notification
firstPlayPlay for the first time
extraInfoExtended information

◆ onVideoResolutionChanged()

void onVideoResolutionChanged ( V2TXLivePlayer  player,
int  width,
int  height 
)
inline

live player resolution change notification

Parameters
playerPlayer object that calls back this notification
widthVideo width
heightVideo height

◆ onWarning()

void onWarning ( V2TXLivePlayer  player,
int  code,
String  msg,
Bundle  extraInfo 
)
inline

live player warning notification

Parameters
playerPlayer object that calls back this notification
codeWarning code V2TXLiveCode
msgWarning message
extraInfoExtended information