Overview
Callbacks of Tencent Cloud’s live stream publisher
Features
You can use V2TXLivePusherObserver
to receive callbacks of V2TXLivePusher, including the publisher status, first audio/video frame, statistics, and warning and error messages.
Callback for error. This callback is triggered when the publisher encounters an error.
V2TXLivePusherListenerType.onError
Parameter | Type | Description |
---|---|---|
code | V2TXLiveCode | Error code |
msg | String | Error message |
extraInfo | Map | Extra information |
Callback for warning.
V2TXLivePusherListenerType.onWarning
Parameter | Type | Description |
---|---|---|
code | V2TXLiveCode | Warning code |
msg | String | Warning message |
extraInfo | Map | Extra information |
Callback of the publisher’s connection status.
V2TXLivePusherListenerType.onPushStatusUpdate
Parameter | Type | Description |
---|---|---|
status | V2TXLivePushStatus | Status code |
msg | String | Status message |
extraInfo | Map | Extra information |
V2TXLivePushStatus
enumerated valuesValue | Description |
---|---|
V2TXLivePushStatusDisconnected: 0 | Disconnected from the server |
V2TXLivePushStatusConnecting: 1 | Connecting to the server |
V2TXLivePushStatusConnectSuccess: 2 | Connected to the server |
V2TXLivePushStatusReconnecting: 3 | Reconnecting to the server |
Callback for a screenshot taken
V2TXLivePusherListenerType.onSnapshotComplete
Parameter | Type | Description |
---|---|---|
image | Uint8List | Screenshot taken |
Callback for custom video processing.
Note:You will receive this callback after you call
V2TXLivePusher.enableCustomVideoProcess(bool enable, V2TXLivePixelFormat pixelFormat, V2TXLiveBufferType bufferType)
to enable custom video processing.
V2TXLivePusherListenerType.onProcessVideoFrame
Parameter | Type | Description |
---|---|---|
srcFrame | Map | For images before processing |
dstFrame | Map | For images after processing |
Callback for a GL context for custom video processing being destroyed.
V2TXLivePusherListenerType.onGLContextDestroyed
Callback for capturing the first video frame.
V2TXLivePusherListenerType.onCaptureFirstVideoFrame
Callback for capturing the first audio frame.
V2TXLivePusherListenerType.onCaptureFirstAudioFrame
Callback of mic capturing volume.
V2TXLivePusherListenerType.onMicrophoneVolumeUpdate
Callback of publisher statistics.
V2TXLivePusherListenerType.onStatisticsUpdate
Parameter | Type | Description |
---|---|---|
statistics | Map | Publisher statistics |
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.
V2TXLivePusherListenerType.onSetMixTranscodingConfig
Parameter | Type | Description |
---|---|---|
code | V2TXLiveCode | 0 : successful; other values: failed |
msg | String | Error message |
Was this page helpful?