tencent cloud

All product documents
APIs
V2TXLivePlayerObserver
Last updated: 2022-10-20 15:57:08
V2TXLivePlayerObserver
Last updated: 2022-10-20 15:57:08
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.

Basic Callback APIs

onError

Callback for error
V2TXLivePlayerListenerType.onError
Parameters
Parameter
Type
Description
code
V2TXLiveCode
Error code
msg
String
Error message
extraInfo
Map
Extra information

onWarning

Callback for warning
V2TXLivePlayerListenerType.onWarning
Parameters
Parameter
Type
Description
code
V2TXLiveCode
Warning code
msg
String
Warning message
extraInfo
Map
Extra information

onConnected

Callback for successfully connecting to the server
V2TXLivePlayerListenerType.onConnected
Parameters
Parameter
Type
Description
extraInfo
Map
Extra information

Video Callback APIs

onVideoPlaying

Callback for video playback
V2TXLivePlayerListenerType.onVideoPlaying
Parameters
Parameter
Type
Description
firstPlay
bool
Whether it is the first playback
extraInfo
Map
Extra information

onVideoLoading

Callback for loading video
V2TXLivePlayerListenerType.onVideoLoading
Parameters
Parameter
Type
Description
extraInfo
Map
Extra information

onVideoResolutionChanged

Callback for change of player resolution
V2TXLivePlayerListenerType.onVideoResolutionChanged
Parameters
Parameter
Type
Description
width
int
Video width
height
int
Video height

onSnapshotComplete

Callback for a screenshot taken
V2TXLivePlayerListenerType.onSnapshotComplete
Parameters
Parameter
Type
Description
image
Uint8List
Screenshot taken

onRenderVideoFrame

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

Audio Callback APIs

onAudioPlaying

Callback for audio playback
V2TXLivePlayerListenerType.onAudioPlaying
Parameters
Parameter
Type
Description
firstPlay
bool
Whether it is the first playback
extraInfo
Map
Extra information

onAudioLoading

Callback for loading audio
V2TXLivePlayerListenerType.onAudioLoading
Parameters
Parameter
Type
Description
extraInfo
Map
Extra information

onPlayoutVolumeUpdate

Callback of the player’s volume
V2TXLivePlayerListenerType.onPlayoutVolumeUpdate
Parameters
Parameter
Type
Description
volume
int
Volume. Value range: 0-100.

Statistics Callback API

onStatisticsUpdate

Callback of the player’s statistics
V2TXLivePlayerListenerType.onStatisticsUpdate
Parameters
Parameter
Type
Description
statistics
Map
Player statistics
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon