tencent cloud

Mobile Live Video Broadcasting

Release Notes and Announcements
TUILiveKit Release Notes
Live SDK Release Notes
User Guide
Product Introduction
Overview
Strengths
Performance Statistics
Concepts
Purchase Guide
TRTC Live Billing Overview
Billing of Video Live Component
Activating the Service (TUILiveKit)
Free Demo
Demo
Run Demo(TUILiveKit)
Integration Guide
Video Live Streaming
Preparation
Host Live Streaming
Audience Viewing
Live Stream List Live Stream List
Voice Chat Room
Preparation
Host Live Streaming
Audience Viewing
Live Stream List
Live Streaming Kit
Live Streaming Kit(Electron Desktop Application)
Live Streaming Kit(Web Desktop Browser)
Live Broadcast Monitoring
Monitoring Webpage (Web Desktop Browser React)
Monitoring Webpage (Web Desktop Browser Vue)
UI Customization
Live Stream Video Component
Video Source Editing Canvas
Audience List Component
Barrage Component
Media Source Configuration Panel
Link Management Panel
Live Gift Component
No UI Integration
Video Live Streaming
Voice Chat Room
Feature Guide
Follow Anchors (TUILiveKit)
Ultimate Image Quality (TUILiveKit)
Push Media Stream Into Room (TUILiveKit)
Gift System (TUILiveKit)
Client APIs
Android
iOS
Web
Server APIs (TUILiveKit)
Account System
REST API
Third-Party Webhooks
Error Codes (TUILiveKit)
FAQs
Platform Compilation
User Authentication
Live SDK
Product Introduction
Purchase Guide
Free Demo
Free Trial License
SDK Download
Licenses
Advanced Features
Client API
FAQs
Integration (No UI)
API Documentation
OSS information
OSS Attribution Notice

V2TXLivePusherObserver

Focus Mode
Font Size
Last updated: 2022-10-13 11:40:06
Overview
Callback notifications for live stream publishing
Features
You can use V2TXLivePusherObserver to receive notifications about V2TXLivePusher, including publisher connection status, first audio/video frame, statistics, and warning and error messages.

Basic Callback APIs

onError

Callback for error. This callback is triggered when the publisher encounters an error.
- (void)onError:(V2TXLiveCode)code message:(NSString *)msg extraInfo:(NSDictionary *)extraInfo

Parameters

Parameter
Type
Description
code
V2TXLiveCode
Error code
msg
NSString *
Error message
extraInfo
NSDictionary *
Extra information

onWarning

Callback for warning.
- (void)onWarning:(V2TXLiveCode)code message:(NSString *)msg extraInfo:(NSDictionary *)extraInfo

Parameters

Parameter
Type
Description
code
V2TXLiveCode
Warning code
msg
NSString *
Warning message
extraInfo
NSDictionary *
Extra information

Video Callback APIs

onPushStatusUpdate

Callback of the publisher’s connection status.
- (void)onPushStatusUpdate:(V2TXLivePushStatus)status
message:(NSString *)msg
extraInfo:(NSDictionary *)extraInfo

Parameters

Parameter
Type
Description
status
V2TXLivePushStatus
Status code
msg
NSString *
Status message
extraInfo
NSDictionary *
Extra information

V2TXLivePushStatus enumerated values

Value
Description
V2TXLivePushStatusDisconnected
Disconnected from the server
V2TXLivePushStatusConnecting
Connecting to the server
V2TXLivePushStatusConnectSuccess
Connected to the server
V2TXLivePushStatusReconnecting
Reconnecting to the server

onSnapshotComplete

Callback for a screenshot taken.
- (void)onSnapshotComplete:(TXImage *)image

Parameters

Parameter
Type
Description
image
TXImage *
The video image captured

onProcessVideoFrame

Callback for custom video processing.
Note:
You will receive this callback after you call V2TXLivePusher#enableCustomVideoProcess:(BOOL)enable pixelFormat:(V2TXLivePixelFormat)pixelFormat bufferType:(V2TXLiveBufferType)bufferType to enable custom video processing.
- (void)onProcessVideoFrame:(V2TXLiveVideoFrame * _Nonnull)srcFrame dstFrame:(V2TXLiveVideoFrame * _Nonnull)dstFrame

Parameters

Parameter
Type
Description
srcFrame
V2TXLiveVideoFrame *
Images before processing
dstFrame
V2TXLiveVideoFrame *
Images after processing

onGLContextDestroyed

Callback for a GL context for custom video processing being destroyed.
- (void)onGLContextDestroyed

onCaptureFirstVideoFrame

Callback for capturing the first video frame.
- (void)onCaptureFirstVideoFrame

Audio Callback APIs

onCaptureFirstAudioFrame

Callback for capturing the first audio frame.
- (void)onCaptureFirstAudioFrame

onMicrophoneVolumeUpdate

Callback of mic capturing volume.
- (void)onMicrophoneVolumeUpdate:(NSInteger)volume

Statistics Callback API

onStatisticsUpdate

Callback of publisher statistics.
- (void)onStatisticsUpdate:(V2TXLivePusherStatistics *)statistics

Parameters

Parameter
Type
Description
statistics
V2TXLivePusherStatistics *
Publisher statistics

MixTranscoding Callback API

onSetMixTranscodingConfig

Callback for setting On-Cloud MixTranscoding parameters.
Note:
You will receive this callback after you call V2TXLivePusher#setMixTranscodingConfig:(V2TXLiveTranscodingConfig *)config to set On-Cloud MixTranscoding parameters.
- (void)onSetMixTranscodingConfig:(V2TXLiveCode)code message:(NSString *)msg
Parameter
Type
Description
code
V2TXLiveCode
0: successful; other values: failed
msg
NSString *
Error message

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback