@objc(THEOplayerCachingParameters) public class CachingParameters : NSObject, Codable
The configuration of a caching task.
The expiration date for the cached data.
RemarkHas to be in the future. Data will remain in the cache until at least the provided date if enough disk space is available. The default expiration date is 30 minutes from the start of the caching task.
@objc public var expirationDate: Date
An approximation of the desired bandwidth, defaults to the highest bandwidth possible.
RemarkThis will take the quality with the lowest bandwidth that is higher than the specified bandwidth in bits per second.
public var bandwidth: Int?
An indication of caching data only on WIFI or on cellular data too. Defaults to true.
- The value can not be changed on a scheduled asset.
- If the download is scheduled/started on WIFI-only mode and suddenly we would like allow Cellular Network download too, the
CachingTaskhas to be removed and scheduled again with the new
@objc public var allowsCellularAccess: Bool
An indication of preferred tracks to be used for offline playback.
- The preferred tracks by the manifest (or the system) will be always cached.
- This parameter gives an opportunity to specify additional tracks (audio and text tracks) to be saved during caching.
CachingParametersTrackSelectionBuilderto create an instance.
@objc public var preferredTrackSelection: CachingParametersTrackSelection
public init(expirationDate: Date, bandwidth: Int? = nil)
The expiration date of the cached data.
The upper bandwidth limit of the quality to cache.