V2TXLivePlayerListenerType enum

腾讯云直播的播放器回调通知。
可以接收 V2TXLivePlayer 播放器的一些回调通知,包括播放器状态、播放音量回调、音视频首帧回调、统计数据、警告和错误信息等。

Inheritance

Constructors

V2TXLivePlayerListenerType()
const

Values

onError → const V2TXLivePlayerListenerType

错误回调,表示 SDK 不可恢复的错误,一定要监听并分情况给用户适当的界面提示

参数:

code 错误码(V2TXLiveCode

msg 错误信息(String)

extraInfo 扩展信息(Map)

onWarning → const V2TXLivePlayerListenerType

警告回调,用于告知您一些非严重性问题,例如出现卡顿或者可恢复的解码失败。

参数:

code 警告码(V2TXLiveCode

msg 警告信息(String)

extraInfo 扩展信息(Map)

onVideoResolutionChanged → const V2TXLivePlayerListenerType

直播播放器分辨率变化通知

参数:

width 视频宽(int)

height 视频高(int)

onConnected → const V2TXLivePlayerListenerType

已经成功连接到服务器

参数:

extraInfo 扩展信息(Map)

onVideoPlaying → const V2TXLivePlayerListenerType

视频播放事件

参数:

firstPlay 第一次播放标志(bool)

extraInfo 扩展信息(Map)

onAudioPlaying → const V2TXLivePlayerListenerType

音频播放事件

参数:

firstPlay 第一次播放标志(bool)

extraInfo 扩展信息(Map)

onVideoLoading → const V2TXLivePlayerListenerType

视频加载事件

参数:

extraInfo 扩展信息(Map)

onAudioLoading → const V2TXLivePlayerListenerType

音频加载事件

参数:

extraInfo 扩展信息(Map)

onPlayoutVolumeUpdate → const V2TXLivePlayerListenerType

播放器音量大小

参数:

volume 音量大小(int),取值范围:0 - 100。

onStatisticsUpdate → const V2TXLivePlayerListenerType

直播播放器统计数据回调

参数:

appCpu 当前 App 的 CPU 使用率(%)(int)

systemCpu 当前系统的 CPU 使用率(%)(int)

width 视频宽度(int)

height 视频高度(int)

fps 帧率(int)

videoBitrate 视频码率(Kbps)(int)

audioBitrate 音频码率(Kbps)(int)

onSnapshotComplete → const V2TXLivePlayerListenerType

截图回调

参数:

image 已截取的视频画面(Uint8List)

onRenderVideoFrame → const V2TXLivePlayerListenerType

自定义视频渲染回调

参数:

videoFrame 视频帧数据(Map)

onReceiveSeiMessage → const V2TXLivePlayerListenerType

收到 SEI 消息的回调

参数:

payloadType 消息类型(int)

data 消息内容(Uint8List)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<V2TXLivePlayerListenerType>
A constant List of the values in this enum, in order of their declaration.
[onError, onWarning, onVideoResolutionChanged, onConnected, onVideoPlaying, onAudioPlaying, onVideoLoading, onAudioLoading, onPlayoutVolumeUpdate, onStatisticsUpdate, onSnapshotComplete, onRenderVideo…