Package com.theoplayer.android.api.cache
Class CachingParameters
-
- All Implemented Interfaces:
public class CachingParameters
The configuration of a caching task.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
CachingParameters.Builder
The builder for the caching parameters.
-
Field Summary
Fields Modifier and Type Field Description public final String
amount
public final Date
expirationDate
public final Long
bandwidth
public final CachingPreferredTrackSelection
preferredTrackSelection
-
Method Summary
Modifier and Type Method Description String
getAmount()
The amount of data to cache for the given stream. Date
getExpirationDate()
The expiration date of the cached data. Long
getBandwidth()
The upper bandwidth limit of the quality to cache. CachingPreferredTrackSelection
getPreferredTrackSelection()
The preferred audio/text tracks to cache. -
-
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.
-
-
-
-