fixed bugs

This commit is contained in:
2026-09-13 12:58:45 +08:00
parent f810cfedd4
commit 5328898971
7 changed files with 233 additions and 61 deletions

View File

@@ -1,11 +1,10 @@
import CryptoKit
import Foundation
/// iOS 端的持久化整文件视频缓存。
/// iOS 端的可选整文件视频缓存。
///
/// AVFoundation 没有公开可持久化的媒体字节缓存 API。这里先把远程视频完整
/// 下载成原子本地文件;只有文件
/// 完整落盘后才返回给播放器,避免用部分响应或播放列表创建可播放的 AVPlayerItem。
/// 播放默认走远程 URL 按需加载(AVPlayer HTTP Range)。若本地已有完整缓存文件,
/// 播放器会优先使用该文件,避免重复拉流。
@MainActor
final class StreamingVideoCache {
static let shared = StreamingVideoCache()