MediaDownloadTask class
单个媒体文件的下载任务
负责管理一个媒体URL的所有分片、下载状态和缓存文件
Constructors
Properties
- cacheDir → Directory
-
final
- contentLength ↔ int
-
getter/setter pair
- contentType ↔ String
-
getter/setter pair
- downloadProgress → double
-
获取下载进度
no setter
- hasActiveSessions → bool
-
no setter
- hasContentType → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAudioFormat → bool
-
no setter
- isCancelled → bool
-
no setter
- isFullyDownloaded → bool
-
是否已完全下载
no setter
- isMp4Format → bool
-
no setter
- isVideoFormat → bool
-
no setter
- lastAccessTime ↔ DateTime
-
getter/setter pair
- mediaUrl → String
-
final
- moovAtStart → bool?
-
no setter
- needsMoovOptimization → bool
-
no setter
-
requestHeaders
→ Map<
String, String> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
MediaSegment> -
no setter
Methods
-
addSession(
) → void - 添加活跃会话
-
cancel(
) → void - 取消任务
-
dispose(
) → void - 释放资源
-
forceFlushConfig(
) → Future< void> - 强制保存配置
-
getSegmentsForRange(
int rangeStart, int rangeEnd) → List< MediaSegment> - 获取指定范围的分片
-
initialize(
) → Future< void> - 初始化任务
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preloadMoovSegment(
) → Future< void> - 预加载 moov 分片
-
removeSession(
) → void - 移除活跃会话
-
toString(
) → String -
A string representation of this object.
inherited
-
updateAccessTime(
) → void - 更新最后访问时间
-
updateSegmentStatus(
MediaSegment segment, SegmentStatus status, [int? downloadedBytes]) → void - 更新分片状态(关键状态立即保存)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited