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

protocol  <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

◆ V2TXLivePlayerObserver-p

protocol V2TXLivePlayerObserver-p
+ Inheritance diagram for <V2TXLivePlayerObserver>:

Instance Methods

(void) - onError:code:message:extraInfo:
 
(void) - onWarning:code:message:extraInfo:
 
(void) - onVideoResolutionChanged:width:height:
 
(void) - onConnected:extraInfo:
 
(void) - onVideoPlaying:firstPlay:extraInfo:
 
(void) - onAudioPlaying:firstPlay:extraInfo:
 
(void) - onVideoLoading:extraInfo:
 
(void) - onAudioLoading:extraInfo:
 
(void) - onPlayoutVolumeUpdate:volume:
 
(void) - onStatisticsUpdate:statistics:
 
(void) - onSnapshotComplete:image:
 
(void) - onRenderVideoFrame:frame:
 
(void) - onReceiveSeiMessage:payloadType:data:
 

Method Documentation

◆ onAudioLoading:extraInfo:()

- (void) onAudioLoading: (id< V2TXLivePlayer >)  player
extraInfo: (NSDictionary *)  extraInfo 
optional

Audio loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onAudioPlaying:firstPlay:extraInfo:()

- (void) onAudioPlaying: (id< V2TXLivePlayer >)  player
firstPlay: (BOOL)  firstPlay
extraInfo: (NSDictionary *)  extraInfo 
optional

Audio playback event

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

◆ onConnected:extraInfo:()

- (void) onConnected: (id< V2TXLivePlayer >)  player
extraInfo: (NSDictionary *)  extraInfo 
optional

live player has successfully connected to the server notification

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onError:code:message:extraInfo:()

- (void) onError: (id< V2TXLivePlayer >)  player
code: (V2TXLiveCode code
message: (NSString *)  msg
extraInfo: (NSDictionary *)  extraInfo 
optional

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:volume:()

- (void) onPlayoutVolumeUpdate: (id< V2TXLivePlayer >)  player
volume: (NSInteger)  volume 
optional

Player playback volume callback.

Attention
This callback notification is received after enableVolumeEvaluation is called to enable playback volume display.
Parameters
playerPlayer object that calls back this notification
volumeCurrent playback volume

◆ onReceiveSeiMessage:payloadType:data:()

- (void) onReceiveSeiMessage: (id< V2TXLivePlayer >)  player
payloadType: (int)  payloadType
data: (NSData *)  data 
optional

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:frame:()

- (void) onRenderVideoFrame: (id< V2TXLivePlayer >)  player
frame: (V2TXLiveVideoFrame *)  videoFrame 
optional

Custom video rendering callback

Attention
Need you call V2TXLivePlayer::enableObserveVideoFrame:pixelFormat:bufferType: "enableObserveVideoFrame" to turn on the callback switch.
Parameters
playerPlayer object that calls back this notification
videoFrameVideo frame data V2TXLiveVideoFrame

◆ onSnapshotComplete:image:()

- (void) onSnapshotComplete: (id< V2TXLivePlayer >)  player
image: (TXImage *)  image 
optional

Screenshot callback

Attention
This callback notification is received after snapshot is called to snapshot.
Parameters
playerPlayer object that calls back this notification
imageCaptured video image

◆ onStatisticsUpdate:statistics:()

- (void) onStatisticsUpdate: (id< V2TXLivePlayer >)  player
statistics: (V2TXLivePlayerStatistics *)  statistics 
optional

Live player statistics callback.

Parameters
playerPlayer object that calls back this notification
statisticsPlayer statistics V2TXLivePlayerStatistics

◆ onVideoLoading:extraInfo:()

- (void) onVideoLoading: (id< V2TXLivePlayer >)  player
extraInfo: (NSDictionary *)  extraInfo 
optional

Video loading event

Parameters
playerPlayer object that calls back this notification
extraInfoExtended information

◆ onVideoPlaying:firstPlay:extraInfo:()

- (void) onVideoPlaying: (id< V2TXLivePlayer >)  player
firstPlay: (BOOL)  firstPlay
extraInfo: (NSDictionary *)  extraInfo 
optional

Video playback event

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

◆ onVideoResolutionChanged:width:height:()

- (void) onVideoResolutionChanged: (id< V2TXLivePlayer >)  player
width: (NSInteger)  width
height: (NSInteger)  height 
optional

live player resolution change notification

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

◆ onWarning:code:message:extraInfo:()

- (void) onWarning: (id< V2TXLivePlayer >)  player
code: (V2TXLiveCode code
message: (NSString *)  msg
extraInfo: (NSDictionary *)  extraInfo 
optional

live player warning notification

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