Interface CachingTask
- 
                    
                    - All Implemented Interfaces:
- 
                            
                            com.theoplayer.android.api.event.EventDispatcher
 
 public interface CachingTask implements EventDispatcher<E> Represents a caching task. 
- 
                
                    
                    - 
                                
                            
                                Method SummaryModifier and Type Method Description abstract StringgetId()The identifier of the task. abstract CachingTaskStatusgetStatus()The current status of the task. abstract SourceDescriptiongetSource()The media source associated with the task. abstract CachingParametersgetParameters()The configuration of the task. abstract doublegetDuration()The requested cached duration of the media, in seconds. abstract longgetBytes()The estimation of the amount this task will download and store, in bytes. abstract longgetBytesCached()The amount downloaded and stored, in bytes. abstract TimeRangesgetCached()The time ranges indicating the data which has been cached. abstract doublegetSecondsCached()The amount of content that has been cached. abstract doublegetPercentageCached()The percentage of content that has been cached. abstract IntegergetStatusNotificationId()The notification identifier of the task when showing its status notification. abstract IntegergetProgressNotificationId()The notification identifier of the task when showing its progress notification. abstract CachingTaskLicenselicense()The API for license related queries and operations. abstract voidstart()Start caching the media. abstract voidpause()Pause caching the media. abstract voidremove()Remove the cached media. abstract CachingTaskErrorgetError()The last error that occurred while Caching, if any. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        getId@NonNull() abstract String getId() The identifier of the task. (NonNull) - Returns:
- The task identifier. 
 
 - 
                                        getStatus@NonNull() abstract CachingTaskStatus getStatus() - Returns:
- The status of the task. (NonNull) 
 
 - 
                                        getSource@NonNull() abstract SourceDescription getSource() The media source associated with the task. - Returns:
- The source description. (NonNull) 
 
 - 
                                        getParameters@NonNull() abstract CachingParameters getParameters() The configuration of the task. - These parameters can not be modified after creating a task. Instead, a new task should be created with different parameters.
 - Returns:
- The parameters of the caching task. (NonNull) 
 
 - 
                                        getDurationabstract double getDuration() The requested cached duration of the media, in seconds. - Returns -1 if the duration is not available yet.
- Returns -1 while caching progressive media.
 - Returns:
- The amount that will be cached, in seconds. 
 
 - 
                                        getBytesabstract long getBytes() The estimation of the amount this task will download and store, in bytes. - Returns -1 if the estimate is not available yet.
 - Returns:
- the data estimation, in bytes. 
 
 - 
                                        getBytesCachedabstract long getBytesCached() The amount downloaded and stored, in bytes. - Returns:
- The amount of data downloaded and stored, in bytes. 
 
 - 
                                        getCached@NonNull() abstract TimeRanges getCached() The time ranges indicating the data which has been cached. - Returns:
- The time ranges cached. (NonNull) 
 
 - 
                                        getSecondsCachedabstract double getSecondsCached() The amount of content that has been cached. - Returns 0 while caching progressive media.
 - Returns:
- The duration cached, in seconds. 
 
 - 
                                        getPercentageCachedabstract double getPercentageCached() The percentage of content that has been cached. - Returns:
- The percentage cached, between 0 and 1. 
 
 - 
                                        getStatusNotificationId@Nullable() abstract Integer getStatusNotificationId() The notification identifier of the task when showing its status notification. - The identifier is null when the task has not been started yet.
 - Returns:
- The notification identifier of the task. (Nullable) 
 
 - 
                                        getProgressNotificationId@Nullable() abstract Integer getProgressNotificationId() The notification identifier of the task when showing its progress notification. - The identifier is null when the task has not been started yet.
 - Returns:
- The notification identifier of the task. (Nullable) 
 
 - 
                                        license@NonNull() abstract CachingTaskLicense license() The API for license related queries and operations. - Returns:
- The CachingTaskLicense. (NonNull) 
 
 - 
                                        start@RequiresPermission(value = "android.permission.FOREGROUND_SERVICE_DATA_SYNC", conditional = true) abstract void start() Start caching the media. - The permission `android.permission.FOREGROUND_SERVICE_DATA_SYNC` is required to be added in the application AndroidManifest.xml
- A manifest or segment will only be cached if it is not yet present in the cache.
 
 - 
                                        pauseabstract void pause() Pause caching the media. - Segments that are currently being downloaded will still be completed and stored.
- A paused task can be resumed with start.
 
 - 
                                        removeabstract void remove() Remove the cached media. - A manifest or segment referenced by multiple tasks will only be evicted if all associated tasks are removed.
 
 - 
                                        getError@Nullable() abstract CachingTaskError getError() The last error that occurred while Caching, if any. (Nullable) 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-