TXVodDownloadController class

include features:

  1. Video predownlaod
  2. Video download
Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteDownloadMediaInfo(TXVodDownloadMediaInfo mediaInfo) Future<bool>
Delete download task.
getDownloadInfo(TXVodDownloadMediaInfo mediaInfo) Future<TXVodDownloadMediaInfo>
Get the download information of the specified video. return TXVodDownloadMediaInfo.
getDownloadList() Future<List<TXVodDownloadMediaInfo>>
Get all video download lists. return TXVodDownloadMediaInfo.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDownloadEvent(Map<String, Object> event) → void
override
onPreDownloadEvent(Map<String, Object> event) → void
override
resumeDownload(TXVodDownloadMediaInfo mediaInfo) Future<void>
Resume downloading. This interface is different from the start downloading interface. This interface will find the corresponding cache and reuse the previous cache to resume downloading, while the start downloading interface will start a brand new download. videoDownloadModel: Download constructor TXVodDownloadMediaInfo.
setDownloadHeaders(Map<String, String> headers) Future<void>
Set download request headers.
setDownloadObserver(FTXDownlodOnStateChangeListener? downlodOnStateChangeListener, FTXDownlodOnErrorListener? downlodOnErrorListener) → void
Set the download event listener. This listener is a global download listener configuration and can be called repeatedly.
startDownload(TXVodDownloadMediaInfo mediaInfo) Future<void>
Start downloading. videoDownloadModel: Download constructor TXVodDownloadMediaInfo.
startPreLoad(String playUrl, double preloadSizeMB, int preferredResolution, {FTXPredownlodOnCompleteListener? onCompleteListener, FTXPredownlodOnErrorListener? onErrorListener}) Future<int>
Start pre-downloading. Important Before starting pre-download, please set the cache directory SuperPlayerPlugin.setGlobalCacheFolderPath and cache size SuperPlayerPlugin.setGlobalMaxCacheSize of the playback engine first. This setting is a global configuration and needs to be consistent with the player to avoid invalidation of playback cache. playUrl: The URL to be pre-downloaded. preloadSizeMB: The pre-downloaded size (unit: MB). preferredResolution: The expected resolution, long type, value is height x width. For example, 720*1080. If multiple resolutions are not supported or not specified, pass -1. onCompleteListener: Pre-download successful callback. onErrorListener: Pre-download failed callback. Return value: Task ID, which can be used to stop pre-download stopPreload.
startPreload(TXPlayInfoParams txPlayInfoParams, double preloadSizeMB, int preferredResolution, {FTXPredownlodOnCompleteListener? onCompleteListener, FTXPredownlodOnErrorListener? onErrorListener, FTXPredownlodOnStartListener? onStartListener}) Future<void>
stopDownload(TXVodDownloadMediaInfo mediaInfo) Future<void>
Stop downloading. videoDownloadModel: Download constructor TXVodDownloadMediaInfo.
stopPreLoad(int taskId) Future<void>
Stop pre-downloading. taskId: Task ID, returned by startPreLoad.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance TXVodDownloadController
no setter

Constants

TAG → const String