SuperPlayerPlugin
Classstatic Future<void> setGlobalLicense(String licenceUrl, String licenceKey) async;
Parameter | Type | Description |
licenceUrl | String | The license URL |
licenceKey | String | The license key |
TXVodPlayerController
, as it already integrates an instance, you don't need to create another.static Future<int?> createVodPlayer() async;
Returned Value | Type | Description |
playerId | int | The player ID |
TXVodPlayerController
, as it already integrates an instance, you don't need to create another.static Future<int?> createLivePlayer() async;
Returned Value | Type | Description |
playerId | int | The player ID |
static Future<int?> setConsoleEnabled() async;
Parameter | Type | Description |
enabled | bool | Enables/Disables player log |
static Future<int?> releasePlayer(int? playerId) async;
static Future<void> setGlobalMaxCacheSize(int size) async;
Parameter | Type | Description |
size | int | The maximum cache size in MB |
static Future<bool> setGlobalCacheFolderPath(String postfixPath) async;
Parameter | Type | Description |
postfixPath | String | The cache path, which is set to the application's sandbox directory by default. You only need to pass in the relative cache directory instead of the entire absolute path to postfixPath . On Android, videos will be cached to the Android/data/your-pkg-name/files/testCache directory on the SD card. On iOS, videos will be cached to the Documents/testCache directory in the sandbox. |
static Future<void> setLogLevel(int logLevel) async;
Parameter | Type | Description |
logLevel | int | 0 : Logs at all levels;1 : DEBUG, INFO, WARNING, ERROR, and FATAL logs;2 : INFO, WARNING, ERROR, and FATAL logs;3 : WARNING, ERROR, and FATAL logs;4 : ERROR and FATAL logs;5 : Only FATAL logs;6 : No SDK logs. |
static Future<void> setBrightness(double brightness) async;
Parameter | Type | Description |
brightness | double | The brightness level. Value range: 0.0–1.0 |
static Future<void> restorePageBrightness() async;
static Future<double> getBrightness() async;
Parameter | Type | Description |
brightness | double | The brightness level. Value range: 0.0–1.0 |
static Future<void> setSystemVolume(double volume) async;
Parameter | Type | Description |
volume | double | The volume level. Value range: 0.0–1.0 |
static Future<double> getSystemVolume() async;
Parameter | Type | Description |
volume | double | The volume level. Value range: 0.0–1.0 |
static Future<double> abandonAudioFocus() async;
static Future<void> requestAudioFocus() async ;
static Future<int> isDeviceSupportPip() async;
Parameter | Type | Description |
isDeviceSupportPip | int | 0 : The PiP mode can be enabled;-101 : The Android version is too early; -102 : The PiP permission is disabled or the device doesn't support PiP; -103 : The current UI has been terminated. |
static Future<String?> getLiteAVSDKVersion() async;
Parameter | Type | Description |
sdkVersion | String | The version of the current player SDK. |
static Future<bool> startVideoOrientationService() async
Parameter | Type | Description |
result | bool | true means the feature was successfully enabled, while false means it failed to enable. Possible reasons for failure include premature activation before the context is initialized or failure to obtain the sensor. |
static Future<void>registerSysBrightness(bool isRegister) async
Parameter | Type | Description |
isRegister | bool | true:Turn on listening. false:Turns off monitoring. |
static Future<void> setUserId(String userId) async
Parameter | Type | Description |
userId | String | userId |
void setSDKListener({FTXLicenceLoadedListener? licenceLoadedListener})
Parameter | Type | Description |
licenceLoadedListener | FTXLicenceLoadedListener | The parameters include result and reason. A result of 0 indicates that the license verification was successful, while the result contains the verification message. |
static Future<void> setLicenseFlexibleValid(bool enabled) async
Parameter | Type | Description |
enabled | bool | Whether to enable flexible verification. |
TXVodPlayerController
ClassFuture<void> initialize({bool? onlyAudio}) async;
Parameter | Type | Description |
onlyAudio | bool | Whether the player is an audio-only player. This parameter is optional. |
startPlay
is replaced by startVodPlay
, and playback will succeed only after you use {@link SuperPlayerPlugin#setGlobalLicense}
to set the license; otherwise, playback will fail (black screen occurs). The license needs to be set only once globally. You can use the license for CSS, UGSV, or video playback. If you have no such licenses, you can quickly apply for a trial license or purchase an official license.Future<bool> startVodPlay(String url) async;
Parameter | Type | Description |
url | String | The URL of the video to be played back. |
Parameter | Type | Description |
result | bool | Whether creation succeeded. |
startPlay
is replaced by startVodPlay
, and playback will succeed only after you use {@link SuperPlayerPlugin#setGlobalLicense}
to set the license; otherwise, playback will fail (black screen occurs). The license needs to be set only once globally. You can use the license for CSS, UGSV, or video playback. If you have no such licenses, you can quickly apply for a trial license or purchase an official license.fileId
.Future<void> startVodPlayWithParams(TXPlayInfoParams params) async;
Parameter | Type | Description |
appId | int | The application's appId , which is required. |
fileId | String | The file ID, which is required. |
sign | String | |
url | String | Video url, either this field or fileId can be filled. |
Future<void> pause() async;
Future<void> resume() async;
Future<bool> stop({bool isNeedClear = false}) async;
Parameter | Type | Description |
isNeedClear | bool | Whether to clear the last-frame image. |
Parameter | Type | Description |
result | bool | Whether stop succeeded. |
startVodPlay
to load the video URL.Future<void> setIsAutoPlay({bool? isAutoPlay}) async;
Parameter | Type | Description |
isAutoPlay | bool | Whether to play back the video automatically. |
Future<bool> isPlaying() async;
Parameter | Type | Description |
isPlaying | bool | Whether playback is ongoing. |
Future<void> setMute(bool mute) async;
Parameter | Type | Description |
mute | bool | Whether to mute the playback. |
Future<void> setLoop(bool loop) async;
Parameter | Type | Description |
loop | bool | Whether to loop the video. |
_controller.seek(progress);
Parameter | Type | Description |
progress | double | Target playback time in seconds. |
Future<void> setRate(double rate) async;
Parameter | Type | Description |
rate | double | Video playback rate. Default value: 1.0 |
Future<List?> getSupportedBitrates() async;
Returned Value | Type | Description |
index | int | Bitrate number |
width | int | The video width for the bitrate |
height | int | Video height for the bitrate |
bitrate | int | Bitrate value |
Future<int> getBitrateIndex() async;
Returned Value | Type | Description |
index | int | Bitrate number |
Future<void> setBitrateIndex(int index) async;
Returned Value | Type | Description |
index | int | The bitrate number. -1 indicates to enable adaptive bitrate streaming. |
Future<void> setStartTime(double startTime) async;
Returned Value | Type | Description |
startTime | double | The playback start time in seconds. |
Future<void> setAudioPlayoutVolume(int volume) async;
Parameter | Type | Description |
volume | int | Video volume level. Value range: 0–100 |
Future<bool> setRequestAudioFocus(bool focus) async;
Parameter | Type | Description |
focus | bool | Whether to set the audio focus. |
Parameter | Type | Description |
result | bool | Whether the focus is set successfully. |
Future<void> setConfig(FTXVodPlayConfig config) async ;
Parameter | Type | Description |
config | FTXVodPlayConfig | For more information, see the FTXVodPlayConfig class. |
Future<double> getCurrentPlaybackTime() async;
Parameter | Type | Description |
playbackTime | double | The current playback time in seconds. |
Future<double> getBufferDuration();
Parameter | Type | Description |
playbackTime | double | The currently buffered video duration in seconds. |
Future<double> getPlayableDuration() async;
Parameter | Type | Description |
playableDuration | double | The currently playable video duration in seconds. |
Future<int> getWidth() async;
Parameter | Type | Description |
width | int | The current video width |
Future<int> getHeight() async;
Parameter | Type | Description |
height | int | The current video height. |
voddrm.token
before the filename in the URL.Future<void> setToken(String? token) async;
Parameter | Type | Description |
token | String | The token for video playback. |
Future<bool> isLoop() async;
Parameter | Type | Description |
isLoop | bool | Whether the player is in loop status. |
Future<bool> enableHardwareDecode(bool enable);
Parameter | Type | Description |
enable | bool | Whether to enable hardware decoding. |
Parameter | Type | Description |
result | bool | The hardware/software decoding setting result. |
Future<void> dispose() async;
Future<double> getDuration() async;
Parameter | Type | Description |
duration | double | The total video duration in seconds. |
Future<int> enterPictureInPictureMode({String? backIconForAndroid, String? playIconForAndroid, String? pauseIconForAndroid, String? forwardIconForAndroid}) async;
Parameter | Type | Description |
backIcon | String | The seek backward icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
playIcon | String | The playback icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
pauseIcon | String | The pause icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
forwardIcon | String | The fast forward icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
Parameter | Code | Description |
NO_ERROR | 0 | Started successfully with no errors. |
ERROR_PIP_LOWER_VERSION | -101 | The Android version is too early and doesn't support the PiP mode. |
ERROR_PIP_DENIED_PERMISSION | -102 | The PiP mode permission wasn't enabled, or the current device doesn't support PiP. |
ERROR_PIP_ACTIVITY_DESTROYED | -103 | The current UI was terminated. |
ERROR_IOS_PIP_DEVICE_NOT_SUPPORT | -104 | The device model or system version doesn't support PiP (only supported on iPadOS 9+ and iOS 14+). This error is applicable only to iOS. |
ERROR_IOS_PIP_PLAYER_NOT_SUPPORT | -105 | The player doesn't support PiP. This error is applicable only to iOS. |
ERROR_IOS_PIP_VIDEO_NOT_SUPPORT | -106 | The video doesn't support PiP. This error is applicable only to iOS. |
ERROR_IOS_PIP_IS_NOT_POSSIBLE | -107 | The PiP controller was unavailable. This error is applicable only to iOS. |
ERROR_IOS_PIP_FROM_SYSTEM | -108 | The PiP controller reported an error. This error is applicable only to iOS. |
ERROR_IOS_PIP_PLAYER_NOT_EXIST | -109 | The player object doesn’t exist. This error is applicable only to iOS. |
ERROR_IOS_PIP_IS_RUNNING | -110 | The PiP feature was running. This error is applicable only to iOS. |
ERROR_IOS_PIP_NOT_RUNNING | -111 | The PiP feature didn't start. This error is applicable only to iOS. |
Future<void> initImageSprite(String? vvtUrl, List<String>? imageUrls) async;
Parameter | Type | Description |
vvtUrl | String | Sprite Image web VTT description file download URL. |
imageUrls | List<String> | Sprite image download URL. |
Future<Uint8List?> getImageSprite(double time) async;
Parameter | Type | Description |
time | double | Time point, in seconds. |
Parameter | Type | Description |
thumb | Uint8List | Sprite Image |
Future<void> exitPictureInPictureMode() async;
Future<void> addSubtitleSource(String url, String name, {String? mimeType}) async;
Parameter | Type | Description |
url | String | subtitle url |
name | String | subtitle name |
mimeType | String | Subtitle type, supports SRT (TXVodPlayEvent.VOD_PLAY_MIMETYPE_TEXT_SRT) and VVT (TXVodPlayEvent.VOD_PLAY_MIMETYPE_TEXT_VTT) formats |
Future<List<TXTrackInfo>> getSubtitleTrackInfo() async;
Parameter | Type | Description |
trackType | int | Track type. The values are:<br /> Video track: TX_VOD_MEDIA_TRACK_TYPE_VIDEO = 1 Audio track: TX_VOD_MEDIA_TRACK_TYPE_AUDIO = 2 Subtitle track: TX_VOD_MEDIA_TRACK_TYPE_SUBTITLE = 3 |
trackIndex | int | track index |
name | String | track name |
isSelected | bool | Whether the current track is selected |
isExclusive | bool | If it is true, only one track of this type can be selected at each time. If it is false, multiple tracks of this type can be selected at the same time. |
isInternal | bool | Whether the current track is an internal original track. |
Future<List<TXTrackInfo>> getAudioTrackInfo() async;
Future<void> selectTrack(int trackIndex) async;
Parameter | Type | Description |
trackIndex | int | Track index, trackIndex track index, obtained through the trackIndex of [TXTrackInfo]. |
Future<void> deselectTrack(int trackIndex) async;
Parameter | Type | Description |
trackIndex | int | Track index, trackIndex track index, obtained through the trackIndex of [TXTrackInfo]. |
Future<void> setStringOption(String key, Object value) async
Parameter | Type | Description |
key | String | Extended parameter key-value pairs. |
value | Object | Extended parameter values. |
FTXVodPlayConfig
ClassParameter | Type | Description |
connectRetryCount | int | The number of player reconnections. If the SDK is disconnected from the server due to an exception, the SDK will attempt to reconnect to the server. |
connectRetryInterval | int | The interval between two player reconnections. If the SDK is disconnected from the server due to an exception, the SDK will attempt to reconnect to the server. |
timeout | int | Player connection timeout period |
playerType | int | Player type. Valid values: 0: VOD; 1: live streaming; 2: live stream replay. |
headers | Map | Custom HTTP headers |
enableAccurateSeek | bool | Whether to enable accurate seek. Default value: true . |
autoRotate | bool | If it is set to true , the MP4 file will be automatically rotated according to the rotation angle set in the file, which can be obtained from the PLAY_EVT_CHANGE_ROTATION event. Default value: true . |
smoothSwitchBitrate | bool | Whether to enable smooth multi-bitrate HLS stream switch. If it is set to false (default), multi-bitrate URLs are opened faster. If it is set to true , the bitrate can be switched smoothly when IDR frames are aligned. |
cacheMp4ExtName | String | The cached MP4 filename extension. Default value: mp4 . |
progressInterval | int | The progress callback interval in milliseconds. If it is not set, the SDK will call back the progress once every 0.5 seconds. |
maxBufferSize | int | The maximum size of playback buffer in MB. The setting will affect playableDuration . The greater the value, the more the data that is buffered in advance. |
maxPreloadSize | int | Maximum preload buffer size in MB |
firstStartPlayBufferTime | int | Duration of the video data that needs to be loaded during the first buffering in ms. Default value: 100 ms |
nextStartPlayBufferTime | int | Minimum buffered data size to stop buffering (secondary buffering for insufficient buffered data or progress bar drag buffering caused by seek ) in ms. Default value: 250 ms |
overlayKey | String | The HLS security enhancement encryption and decryption key |
overlayIv | String | The HLS security enhancement encryption and decryption IV |
extInfoMap | Map | Some special configuration items |
enableRenderProcess | bool | Whether to allow the postrendering and postproduction feature, which is enabled by default. If the super-resolution plugin exists after it is enabled, the plugin will be loaded by default |
preferredResolution | int | Resolution of the video used for playback preferably. preferredResolution = width * height |
mediaType | int | Set the media type, with AUTO as the default value. Optional values are: TXVodConstants#MEDIA_TYPE_AUTO, AUTO type (default value, adaptive bit rate playback is not supported for now); TXVodConstants#MEDIA_TYPE_HLS_VOD, HLS VOD media; TXVodConstants#MEDIA_TYPE_HLS_LIVE, HLS live media; TXVodConstants#MEDIA_TYPE_HLS_VOD, MP4 and other common file VOD media (supported starting from version 11.7); TXVodConstants#MEDIA_TYPE_DASH_VOD, DASH VOD media (supported starting from version 11.7); |
TXLivePlayerController
ClassFuture<void> initialize({bool? onlyAudio}) async;
Parameter | Type | Description |
onlyAudio | bool | Whether the player is an audio-only player. This parameter is optional. |
startPlay
is replaced by startLivePlay
, and playback will succeed only after you use {@link SuperPlayerPlugin#setGlobalLicense}
to set the license; otherwise, playback will fail (black screen occurs). The license needs to be set only once globally. You can use the license for CSS, UGSV, or video playback. If you have no such licenses, you can quickly apply for a trial license or purchase an official license.Future<bool> play(String url) async;
Parameter | Type | Description |
url | String | The URL of the video to be played back. |
Parameter | Type | Description |
result | bool | Whether creation succeeded. |
Future<void> pause() async;
Future<void> resume() async;
Future<bool> stop({bool isNeedClear = false}) async;
Parameter | Type | Description |
isNeedClear | bool | Whether to clear the last-frame image. |
Parameter | Type | Description |
result | bool | Whether stop succeeded. |
Future<bool> isPlaying() async;
Parameter | Type | Description |
isPlaying | bool | Whether playback is ongoing. |
Future<void> setMute(bool mute) async;
Parameter | Type | Description |
mute | bool | Whether to mute the playback. |
Future<void> setVolume(int volume);
Parameter | Type | Description |
volume | int | Video volume level. Value range: 0–100 |
Future<void> setLiveMode(TXPlayerLiveMode mode) async;
Parameter | Type | Description |
mode | int | Live streaming mode, which can be set to auto, expedited, or smooth mode. |
appID
for cloud-based control.Future<void> setAppID(int appId) async;
Parameter | Type | Description |
appId | int | The application ID. |
Future<bool> enableHardwareDecode(bool enable);
Parameter | Type | Description |
enable | bool | Whether to enable hardware decoding. |
Parameter | Type | Description |
result | bool | The hardware/software decoding setting result. |
Future<int> enterPictureInPictureMode({String? backIconForAndroid, String? playIconForAndroid, String? pauseIconForAndroid, String? forwardIconForAndroid}) async;
Parameter | Type | Description |
backIcon | String | The seek backward icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
playIcon | String | The playback icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
pauseIcon | String | The pause icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
forwardIcon | String | The fast forward icon, which can be up to 1 MB in size as limited by Android. It is optional, and if it is not set, the system icon will be used. |
Parameter | Code | Description |
NO_ERROR | 0 | Started successfully with no errors. |
ERROR_PIP_LOWER_VERSION | -101 | The Android version is too early and doesn't support the PiP mode. |
ERROR_PIP_DENIED_PERMISSION | -102 | The PiP mode permission wasn't enabled, or the current device doesn't support PiP. |
ERROR_PIP_ACTIVITY_DESTROYED | -103 | The current UI was terminated. |
ERROR_IOS_PIP_DEVICE_NOT_SUPPORT | -104 | The device model or system version doesn't support PiP (only supported on iPadOS 9+ and iOS 14+). This error is applicable only to iOS. |
ERROR_IOS_PIP_PLAYER_NOT_SUPPORT | -105 | The player doesn't support PiP. This error is applicable only to iOS. |
ERROR_IOS_PIP_VIDEO_NOT_SUPPORT | -106 | The video doesn't support PiP. This error is applicable only to iOS. |
ERROR_IOS_PIP_IS_NOT_POSSIBLE | -107 | The PiP controller was unavailable. This error is applicable only to iOS. |
ERROR_IOS_PIP_FROM_SYSTEM | -108 | The PiP controller reported an error. This error is applicable only to iOS. |
ERROR_IOS_PIP_PLAYER_NOT_EXIST | -109 | The player object doesn’t exist. This error is applicable only to iOS. |
ERROR_IOS_PIP_IS_RUNNING | -110 | The PiP feature was running. This error is applicable only to iOS. |
ERROR_IOS_PIP_NOT_RUNNING | -111 | The PiP feature didn't start. This error is applicable only to iOS. |
Future<void> dispose() async;
Future<int> switchStream(String url) async;
Parameter | Type | Description |
url | String | The video source to be switched to. |
Parameter | Type | Description |
result | int | The switch result. |
Future<int> enableReceiveSeiMessage(bool isEnabled, int payloadType) async
Parameter | Type | Description |
isEnabled | bool | Whether to enable reception of SEI messages, default is off. |
payloadType | int | Specify the payloadType for receiving SEI messages, supporting 5, 242, 243. Please ensure it matches the payloadType of the sender. |
Parameter | Type | Description |
result | int | The result of enabling. |
Future<void> showDebugView(bool isShow) async
Parameter | Type | Description |
isShow | bool | Whether to display the debug information layer. |
Future<int> setProperty(String key, Object value) async
Parameter | Type | Description |
key | String | Extended parameter key-value pairs. |
value | Object | Extended parameter values. |
Parameter | Type | Description |
result | int | The result of the setting. |
Future<List<FSteamInfo>> getSupportedBitrate() async
Future<int> setCacheParams(double minTime, double maxTime) async
Parameter | Type | Description |
minTime | double | Minimum time for automatic cache adjustment. |
maxTime | double | Maximum time for automatic cache adjustment. |
Parameter | Type | Description |
result | int | The result of the setting. |
FTXLivePlayConfig
ClassParameter | Type | Description |
maxAutoAdjustCacheTime | double | The maximum time for automatic cache time adjustment in seconds. The value must be greater than 0 . Default value: 5 . |
minAutoAdjustCacheTime | double | The minimum time for automatic cache time adjustment in seconds. The value must be greater than 0 . Default value: 1 . |
connectRetryCount | int | The default number of times the SDK tries reconnecting when the player is disconnected. Value range: 1–10. Default value: 3 |
connectRetryInterval | int | The interval between network reconnections in seconds. Value range: 3–30. Default value: 3 |
TXVodDownloadController
Class[SuperPlayerPlugin.setGlobalCacheFolderPath]
and cache size [SuperPlayerPlugin.setGlobalMaxCacheSize]
of the playback engine. This setting is a global configuration and needs to be consistent with the player to avoid invalidating the playback cache.Future<int> startPreLoad(final String playUrl,final int preloadSizeMB,final int preferredResolution, {FTXPredownlodOnCompleteListener? onCompleteListener,FTXPredownlodOnErrorListener? onErrorListener,}) async
Future<void> startPreload(TXPlayInfoParams txPlayInfoParams, final int preloadSizeMB, final int preferredResolution, { FTXPredownlodOnCompleteListener? onCompleteListener, FTXPredownlodOnErrorListener? onErrorListener, FTXPredownlodOnStartListener? onStartListener, }) async
Parameter | Type | Description |
playUrl | String | The URL to be preloaded |
preloadSizeMB | int | Size of preloaded data (unit: MB). |
preferredResolution | int | Expected resolution, with the value in the format of height x width. For example, 720x1080. If multiple resolutions are not supported or not specified, pass -1. |
onCompleteListener | FTXPredownlodOnCompleteListener? | Preloading successful callback, global. |
onErrorListener | FTXPredownlodOnErrorListener | Preloading failed callback, global. |
Parameter | Type | Description |
appId | int | The application's appId, which is required. |
fileId | String | The file ID, which is required. |
url | String | Only one of the video url and fileId needs to be filled in. If both are filled in, the url takes priority. |
sign | String |
Parameter | Type | Description |
taskId | int | task ID |
Future<void> stopPreLoad(final int taskId) async
Parameter | Type | Description |
taskId | int | task ID |
Future<void> startDownload(TXVodDownloadMediaInfo mediaInfo) async
Parameter | Type | Description |
mediaInfo | TXVodDownloadMediaInfo | Download task information. |
Parameter | Type | Description |
playPath | String? | Cache address. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
progress | double? | Cache progress. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
downloadState | int? | Cache status. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
userName | String? | Download account name used to distinguish downloads from different accounts. Pass an empty string to use "default". |
duration | int? | Total duration of cached video. The unit is milliseconds on Android and seconds on iOS. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
playableDuration | int? | Cached duration of the video. The unit is milliseconds on Android and seconds on iOS. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
size | int? | Total file size, in bytes. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
downloadSize | int? | Downloaded file size, in bytes. This value is obtained when accessing the video cache and does not need to be assigned when starting the download. |
url | String? | The URL of the video to be downloaded. This is a required field for downloading URLs. Nesting m3u8 and mp4 downloads is not supported. |
dataSource | TXVodDownloadDataSource? | File ID information of the video to be downloaded. Either the URL or this parameter can be used, but at least one is required. |
speed | int? | Download speed, in units of KBytes/second. |
isResourceBroken | bool? | Whether the resource is corrupted, e.g. the resource has been deleted. |
Parameter | Type | Description |
appId | int? | The App ID corresponding to the downloaded file. This is a required field. |
fileId | String? | The ID of the downloaded file. This is a required field. |
pSign | String? | Encryption signature. This is a required field for encrypted videos. |
quality | int? | The ID of the video quality. This is a required field. |
token | String? | Encryption token. |
userName | String? | Download account name used to distinguish downloads from different accounts. Pass an empty string to use "default". |
Future<void> stopDownload(TXVodDownloadMediaInfo mediaInfo) async
Parameter | Type | Description |
mediaInfo | TXVodDownloadMediaInfo | Task information. |
Future<void> setDownloadHeaders(Map<String, String> headers) async
Parameter | Type | Description |
headers | Map<String, String> | request heade information |
Future<List<TXVodDownloadMediaInfo>> getDownloadList() async
Parameter | Type | Description |
mediaInfoList | List<TXVodDownloadMediaInfo> | Task list. Different users' downloads can be distinguished by comparing the user name. |
Future<TXVodDownloadMediaInfo> getDownloadInfo(TXVodDownloadMediaInfo mediaInfo) async
Parameter | Type | Description |
mediaInfo | TXVodDownloadMediaInfo | task information |
Parameter | Type | Description |
mediaInfo | TXVodDownloadMediaInfo | Cached task details. |
void setDownloadObserver(FTXDownlodOnStateChangeListener downlodOnStateChangeListener, FTXDownlodOnErrorListener downlodOnErrorListener)
Parameter | Type | Description |
downlodOnStateChangeListener | FTXDownlodOnStateChangeListener | Task download status callback. |
downlodOnErrorListener | FTXDownlodOnErrorListener | Task download error callback. |
Future<bool> deleteDownloadMediaInfo(TXVodDownloadMediaInfo mediaInfo) async
Parameter | Type | Description |
mediaInfo | TXVodDownloadMediaInfo | Cached task details. |
Parameter | Type | Description |
result | bool | Deletion result. |
この記事はお役に立ちましたか?