Package com.theoplayer.android.api.cache
Class CachingParameters
-
- All Implemented Interfaces:
public class CachingParametersThe configuration of a caching task.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCachingParameters.BuilderThe builder for the caching parameters.
-
Field Summary
Fields Modifier and Type Field Description public final Stringamountpublic final DateexpirationDatepublic final Longbandwidthpublic final CachingPreferredTrackSelectionpreferredTrackSelectionpublic final CacheStorageTypestorageType
-
Method Summary
Modifier and Type Method Description StringgetAmount()The amount of data to cache for the given stream. DategetExpirationDate()The expiration date of the cached data. LonggetBandwidth()The upper bandwidth limit of the quality to cache. CachingPreferredTrackSelectiongetPreferredTrackSelection()The preferred audio/text tracks to cache. CacheStorageTypegetStorageType()The storage type to use for caching. -
-
Method Detail
-
getAmount
@NonNull() String getAmount()
The amount of data to cache for the given stream.
Possible formats:
- A number in seconds.
- A percentage string (XX%) for a proportion of the content duration.
Default: "100%"
- Returns:
The amount of data to cache. (NonNull)
-
getExpirationDate
@NonNull() Date getExpirationDate()
The expiration date of the cached data.
Default: 30 minutes after starting the caching task.
- Returns:
The expiration date. (NonNull)
-
getBandwidth
@NonNull() Long getBandwidth()
The upper bandwidth limit of the quality to cache.
Default: MAX_VALUE
- Returns:
The upper bandwidth limit of the quality to cache.
-
getPreferredTrackSelection
@NonNull() CachingPreferredTrackSelection getPreferredTrackSelection()
The preferred audio/text tracks to cache.
Default: An empty CachingPreferredTrackSelection
- Returns:
The preferred track selection caching parameter.
-
getStorageType
@NonNull() CacheStorageType getStorageType()
The storage type to use for caching.
- Returns:
The storage type to use.
-
-
-
-