TXFlutterSuperPlayerPluginAPI class

Constructors

TXFlutterSuperPlayerPluginAPI.new({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
Constructor for TXFlutterSuperPlayerPluginAPI. The binaryMessenger named argument is available for dependency injection. If it is left null, the default BinaryMessenger will be used which routes to the host platform.

Properties

hashCode int
The hash code for this object.
no setterinherited
pigeonVar_binaryMessenger BinaryMessenger?
final
pigeonVar_messageChannelSuffix String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createLivePlayer(bool onlyAudio) Future<PlayerMsg>
创建直播播放器
createVodPlayer(bool onlyAudio) Future<PlayerMsg>
创建点播播放器
getLiteAVSDKVersion() Future<StringMsg>
获取依赖Native端的 LiteAVSDK 的版本
getPlatformVersion() Future<StringMsg>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releasePlayer(PlayerMsg playerId) Future<void>
释放播放器资源
setConsoleEnabled(BoolMsg enabled) Future<void>
开关log输出
setDrmProvisionEnv(int env) Future<void>
setGlobalCacheFolderCustomPath(CachePathMsg cacheMsg) Future<BoolMsg>
设置播放器资源缓存目录绝对路径,该方法会与 setGlobalCacheFolderPath(String postfixPath) 相互覆盖,调用其中一个即可
setGlobalCacheFolderPath(StringMsg postfixPath) Future<BoolMsg>
在短视频播放场景中,视频文件的本地缓存是很刚需的一个特性,对于普通用户而言,一个已经看过的视频再次观看时,不应该再消耗一次流量。 @格式支持:SDK 支持 HLS(m3u8) 和 MP4 两种常见点播格式的缓存功能。 @开启时机:SDK 并不默认开启缓存功能,对于用户回看率不高的场景,也并不推荐您开启此功能。 @开启方式:全局生效,在使用播放器开启。开启此功能需要配置两个参数:本地缓存目录及缓存大小。
setGlobalEnv(StringMsg envConfig) Future<IntMsg>
设置 liteav SDK 接入的环境。 腾讯云在全球各地区部署的环境,按照各地区政策法规要求,需要接入不同地区接入点。
setGlobalLicense(LicenseMsg licenseMsg) Future<void>
设置全局license
setGlobalMaxCacheSize(IntMsg size) Future<void>
设置播放引擎的最大缓存大小。设置后会根据设定值自动清理Cache目录的文件 @param size 最大缓存大小(单位:MB)
setLicenseFlexibleValid(BoolMsg msg) Future<void>
setLogLevel(IntMsg logLevel) Future<void>
设置log输出级别 TXLogLevel
setUserId(StringMsg msg) Future<void>
startVideoOrientationService() Future<BoolMsg>
开始监听设备旋转方向,开启之后,如果设备自动旋转打开,播放器会自动根据当前设备方向来旋转视频方向。
toString() String
A string representation of this object.
inherited

Operators

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

Constants

pigeonChannelCodec → const MessageCodec<Object?>