FWPlayerCacheConfiguration
@interface FWPlayerCacheConfiguration : NSObject <NSCopying>
+ (NSString *)configurationFilePathForFilePath:(NSString *)filePath;
+ (instancetype)configurationWithFilePath:(NSString *)filePath;
@property (nonatomic, copy, readonly) NSString *filePath;
@property (nonatomic, strong) FWPlayerCacheContentInfo *contentInfo;
@property (nonatomic, strong) NSURL *url;
- (NSArray<NSValue *> *)cacheFragments;
/**
* cached progress
*/
@property (nonatomic, readonly) float progress;
@property (nonatomic, readonly) long long downloadedBytes;
@property (nonatomic, readonly) float downloadSpeed; // kb/s
#pragma mark - update API
- (void)save;
- (void)addCacheFragment:(NSRange)fragment;
/**
* Record the download speed
*/
- (void)addDownloadedBytes:(long long)bytes spent:(NSTimeInterval)time;
+ (BOOL)createAndSaveDownloadedConfigurationForURL:(NSURL *)url error:(NSError **)error;
@end
Undocumented
-
Undocumented
Declaration
Objective-C
+ (NSString *)configurationFilePathForFilePath:(NSString *)filePath;
-
Undocumented
Declaration
Objective-C
+ (instancetype)configurationWithFilePath:(NSString *)filePath;
-
Undocumented
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *filePath
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong) FWPlayerCacheContentInfo *contentInfo
-
Undocumented
Declaration
Objective-C
@property (nonatomic, strong) NSURL *url
-
Undocumented
Declaration
Objective-C
- (NSArray<NSValue *> *)cacheFragments;
-
cached progress
Declaration
Objective-C
@property (nonatomic, readonly) float progress;
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) long long downloadedBytes
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) float downloadSpeed
-
Undocumented
Declaration
Objective-C
- (void)save;
-
Undocumented
Declaration
Objective-C
- (void)addCacheFragment:(NSRange)fragment;
-
Record the download speed
Declaration
Objective-C
- (void)addDownloadedBytes:(long long)bytes spent:(NSTimeInterval)time;
-
Undocumented
Declaration
Objective-C
+ (BOOL)createAndSaveDownloadedConfigurationForURL:(NSURL *)url error:(NSError **)error;