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

V2TXLivePlayerObserver

フォーカスモード
フォントサイズ
最終更新日: 2022-10-13 11:40:07
Overview
Callbacks of Tencent Cloud’s live stream player.
Features
You can use V2TXLivePlayerObserver to receive callbacks of V2TXLivePlayer including player status, playback volume, first audio/video frame, statistics, warning and error messages, etc.

Basic Callback APIs

onError

Callback for error
public void onError(V2TXLivePlayer player, int code, String msg, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
code
int
Error code
msg
String
Error message
extraInfo
Bundle
Extra information

onWarning

Callback for warning
public void onWarning(V2TXLivePlayer player, int code, String msg, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
code
int
Warning code
msg
String
Warning message
extraInfo
Bundle
Extra information

onConnected

Callback for successfully connecting to the server
public void onConnected(V2TXLivePlayer player, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
extraInfo
Bundle
Extra information

Video Callback APIs

onVideoResolutionChanged

Callback for change of player resolution
public void onVideoResolutionChanged(V2TXLivePlayer player, int width, int height)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
width
int
Video width
height
int
Video height

onVideoLoading

Callback for loading video
public void onVideoLoading(V2TXLivePlayer player, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
extraInfo
Bundle
Extra information

onVideoPlaying

Callback for video playback
public void onVideoPlaying(V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
firstPlay
boolean
Whether it is the first playback
extraInfo
Bundle
Extra information

onSnapshotComplete

Callback for a screenshot taken
public void onSnapshotComplete(V2TXLivePlayer player, Bitmap image)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
image
Bitmap *
The video image captured

onRenderVideoFrame

Callback for custom video rendering
Note:
You will receive this callback after calling [V2TXLivePlayer enableCustomRendering:pixelFormat:bufferType:] to enable custom video rendering.
public void onRenderVideoFrame(V2TXLivePlayer player, V2TXLiveVideoFrame videoFrame)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
videoFrame
V2TXLiveVideoFrame
Video frame

Audio Callback APIs

onAudioLoading

Callback for loading audio
public void onAudioLoading(V2TXLivePlayer player, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
extraInfo
Bundle
Extra information

onAudioPlaying

Callback for audio playback
public void onAudioPlaying(V2TXLivePlayer player, boolean firstPlay, Bundle extraInfo)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
firstPlay
boolean
Whether it is the first playback
extraInfo
Bundle
Extra information

onPlayoutVolumeUpdate

Callback of the player’s volume
public void onPlayoutVolumeUpdate(V2TXLivePlayer player, int volume)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
volume
int
Volume. Value range: 0-100

Statistics Callback API

onStatisticsUpdate

Callback of the player’s statistics
public void onStatisticsUpdate(V2TXLivePlayer player, V2TXLivePlayerStatistics statistics)

Parameters

Parameter
Type
Description
player
V2TXLivePlayer
The player object sending the callback
statistics
V2TXLivePlayerStatistics
Player statistics

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック