V2TXLivePlayerObserver
to receive callbacks of V2TXLivePlayer, including player status, playback volume, first audio/video frame, statistics, warning and error messages, etc.- (void)onError:(id<V2TXLivePlayer>)playercode:(V2TXLiveCode)codemessage:(NSString *)msgextraInfo:(NSDictionary *)extraInfo
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
code | V2TXLiveCode | Error code |
msg | NSString * | Error message |
extraInfo | NSDictionary * | Extra information |
- (void)onWarning:(id<V2TXLivePlayer>)playercode:(V2TXLiveCode)codemessage:(NSString *)msgextraInfo:(NSDictionary *)extraInfo
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
code | V2TXLiveCode | Warning code |
msg | NSString * | Warning message |
extraInfo | NSDictionary * | Extra information |
- (void)onConnected:(id<V2TXLivePlayer>)playerextraInfo:(NSDictionary *)extraInfo
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | NSDictionary * | Extra information |
- (void)onVideoPlaying:(id<V2TXLivePlayer>)playerfirstPlay:(BOOL)firstPlayextraInfo:(NSDictionary *)extraInfo
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
firstPlay | BOOL | Whether it is the first playback |
extraInfo | NSDictionary * | Extra information |
- (void)onVideoLoading:(id<V2TXLivePlayer>)playerextraInfo:(NSDictionary *)extraInfo;
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | NSDictionary * | Extra information |
- (void)onVideoResolutionChanged:(id<V2TXLivePlayer>)playerwidth:(NSInteger)widthheight:(NSInteger)height;
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
width | NSInteger | Video width |
height | NSInteger | Video height |
- (void)onSnapshotComplete:(id<V2TXLivePlayer>)player image:(TXImage *)image
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
image | TXImage * | The video image captured |
[V2TXLivePlayer enableCustomRendering:pixelFormat:bufferType:]
to enable custom video rendering.- (void)onRenderVideoFrame:(id<V2TXLivePlayer>)playerframe:(V2TXLiveVideoFrame *)videoFrame
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
videoFrame | V2TXLiveVideoFrame * | Video frame |
- (void)onAudioPlaying:(id<V2TXLivePlayer>)playerfirstPlay:(BOOL)firstPlayextraInfo:(NSDictionary *)extraInfo;
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
firstPlay | BOOL | Whether it is the first playback |
extraInfo | NSDictionary * | Extra information |
- (void)onAudioLoading:(id<V2TXLivePlayer>)playerextraInfo:(NSDictionary *)extraInfo;
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
extraInfo | NSDictionary * | Extra information |
- (void)onPlayoutVolumeUpdate:(id<V2TXLivePlayer>)player volume:(NSInteger)volume
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
volume | NSInteger | Volume. Value range: 0-100 |
- (void)onStatisticsUpdate:(id<V2TXLivePlayer>)playerstatistics:(V2TXLivePlayerStatistics *)statistics
Parameter | Type | Description |
player | V2TXLivePlayer | The player object sending the callback |
statistics | V2TXLivePlayerStatistics | Player statistics |
Was this page helpful?