Overview
Callbacks of Tencent Cloud’s live stream player.
Features
You can use V2TXLivePlayerObserver
to receive callbacks of V2TXLivePlayer, including the player status, playback volume, first audio/video frame, statistics, and warning and error messages.
Callback for error
V2TXLivePlayerListenerType.onError
Parameters
Parameter | Type | Description |
---|---|---|
code | V2TXLiveCode | Error code |
msg | String | Error message |
extraInfo | Map | Extra information |
Callback for warning
V2TXLivePlayerListenerType.onWarning
Parameters
Parameter | Type | Description |
---|---|---|
code | V2TXLiveCode | Warning code |
msg | String | Warning message |
extraInfo | Map | Extra information |
Callback for successfully connecting to the server
V2TXLivePlayerListenerType.onConnected
Parameters
Parameter | Type | Description |
---|---|---|
extraInfo | Map | Extra information |
Callback for video playback
V2TXLivePlayerListenerType.onVideoPlaying
Parameters
Parameter | Type | Description |
---|---|---|
firstPlay | bool | Whether it is the first playback |
extraInfo | Map | Extra information |
Callback for loading video
V2TXLivePlayerListenerType.onVideoLoading
Parameters
Parameter | Type | Description |
---|---|---|
extraInfo | Map | Extra information |
Callback for change of player resolution
V2TXLivePlayerListenerType.onVideoResolutionChanged
Parameters
Parameter | Type | Description |
---|---|---|
width | int | Video width |
height | int | Video height |
Callback for a screenshot taken
V2TXLivePlayerListenerType.onSnapshotComplete
Parameters
Parameter | Type | Description |
---|---|---|
image | Uint8List | Screenshot taken |
Callback for custom video rendering
Note:You will receive this callback after calling
V2TXLivePlayer.enableCustomRendering(pixelFormat:bufferType:)
to enable custom video rendering.
V2TXLivePlayerListenerType.onRenderVideoFrame
Parameters
Parameter | Type | Description |
---|---|---|
videoFrame | Map | Video frames |
Callback for audio playback
V2TXLivePlayerListenerType.onAudioPlaying
Parameters
Parameter | Type | Description |
---|---|---|
firstPlay | bool | Whether it is the first playback |
extraInfo | Map | Extra information |
Callback for loading audio
V2TXLivePlayerListenerType.onAudioLoading
Parameters
Parameter | Type | Description |
---|---|---|
extraInfo | Map | Extra information |
Callback of the player’s volume
V2TXLivePlayerListenerType.onPlayoutVolumeUpdate
Parameters
Parameter | Type | Description |
---|---|---|
volume | int | Volume. Value range: 0-100. |
Callback of the player’s statistics
V2TXLivePlayerListenerType.onStatisticsUpdate
Parameters
Parameter | Type | Description |
---|---|---|
statistics | Map | Player statistics |
Was this page helpful?