SuperPlayerPlugin class

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
onEventBroadcast Stream<Map>
Native interaction, common event listener, events from the plugin, such as sound change events. 原生交互,通用事件监听,来自插件的事件,例如 声音变化、播放器SDK加载鉴权等事件
no setter
onExtraEventBroadcast Stream<Map>
Native interaction, common event listener, events from the native container, such as PIP events, activity/controller lifecycle changes. 原生交互,通用事件监听,来自原生容器的事件,例如 PIP事件、activity/controller 生命周期变化
no setter
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
onNativeEvent(Map<String?, Object?> event) → void
override
onPipEvent(Map event) → void
override
onSDKListener(Map event) → void
override
setSDKListener({FTXLicenceLoadedListener? licenceLoadedListener}) → void
设置SDK的监听,目前有licence加载监听,后续还会陆续开放其他类型的监听
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance SuperPlayerPlugin
no setter
platformVersion Future<String?>
no setter

Static Methods

abandonAudioFocus() Future<void>
Release audio focus, for Android only 释放音频焦点,只用于安卓端
createLivePlayer({bool? onlyAudio}) Future<int?>
Creating a live streaming player 创建直播播放器
createVodPlayer({bool? onlyAudio}) Future<int?>
Creating a VOD player 创建点播播放器
getBrightness() Future<double?>
Getting the current brightness of the interface, which ranges from 0.0 to 1.0 获得当前界面亮度 0.0 ~ 1.0
getLiteAVSDKVersion() Future<String?>
Getting the version of LiteAVSDK that depends on the native side 获取依赖Native端的 LiteAVSDK 的版本
getSysBrightness() Future<double?>
Get the system interface brightness. The iOS system has the same interface brightness, while there may be differences in Android. Range: 0.0 ~ 1.0. 获取系统界面亮度,IOS系统与界面亮度一致,安卓可能会有差异 范围:0.0 ~ 1.0
getSystemVolume() Future<double?>
Get the current system volume, range: 0.0 ~ 1.0 获得当前系统音量,范围:0.0 ~ 1.0
isDeviceSupportPip() Future<int?>
Whether the current device supports picture-in-picture mode. @return TXVodPlayEvent 0 Picture-in-picture mode can be enabled. -101 The Android version is too low. -102 Picture-in-picture permission is disabled or the device does not support picture-in-picture mode. -103 The current interface has been destroyed.
registerSysBrightness(bool isRegister) Future<void>
register or unregister system brightness.if register the system brightness observer, current window brightness wil changed by system brightness's change.
releasePlayer(int? playerId) Future<void>
Releasing player resources 释放播放器资源
requestAudioFocus() Future<void>
Request audio focus, for Android only 请求获得音频焦点,只用于安卓端
restorePageBrightness() Future<void>
Restoring the brightness of the current interface 恢复当前界面亮度
setBrightness(double brightness) Future<void>
Adjusting the brightness of the current interface 修改当前界面亮度
setConsoleEnabled(bool enabled) Future<void>
Turning on/off log output 开关log输出
setDrmProvisionEnv(TXDrmProvisionEnv env) Future<void>
设置 Drm 证书提供商环境,参考 TXDrmProvisionEnv
setGlobalCacheFolderCustomPath({String? androidAbsolutePath, String? iOSAbsolutePath}) Future<bool?>
Set the absolute path of the player resource cache directory. This method will override each other with setGlobalCacheFolderPath(String postfixPath), and you only need to call one of them.
setGlobalCacheFolderPath(String postfixPath) Future<bool?>
Local caching of video files is a highly demanded feature in short video playback scenarios. For ordinary users, when watching a video that has already been viewed, it should not consume data traffic again. @Format support: The SDK supports caching for two common VOD formats: HLS(m3u8) and MP4. @Timing of enabling: The SDK does not enable caching by default, and it is not recommended to enable this feature for scenarios with low user review rates. @Method of enabling: Global effect, enabled with the player. To enable this feature, two parameters need to be configured: the local cache directory and the cache size.
setGlobalEnv(String envConfig) Future<int?>
Setting the environment for accessing the LiteAV SDK. Tencent Cloud has deployed environments in various regions around the world, and different access points need to be accessed according to local policies and regulations.
setGlobalLicense(String licenceUrl, String licenceKey) Future<void>
Setting the global license 设置全局license
setGlobalMaxCacheSize(int size) Future<void>
Setting the maximum cache size for the playback engine. After setting, files in the Cache directory will be automatically cleaned up based on the set value. @param size Maximum cache size (unit: MB).
setLicenseFlexibleValid(bool enabled) Future<void>
开启播放器 License 柔性校验,开启后在播放器首次启动后前 2 次播放校验将默认通过
setLogLevel(int logLevel) Future<void>
Setting the log output level TXLogLevel
setSystemVolume(double volume) Future<void>
Set the current system volume, 0.0 ~ 1.0. 设置当前系统音量,0.0 ~ 1.0
setUserId(String userId) Future<void>
设置 userId,便于定位问题
startVideoOrientationService() Future<bool?>
Starts listening for device rotation direction. After it is turned on, if the device's auto-rotation is turned on, the player will automatically rotate the video direction based on the current device orientation.

Constants

TAG → const String