THEOplayer Web SDK
    Preparing search index...

    Interface CachingTask

    Represents a caching task.

    interface CachingTask {
        bytes: number;
        bytesCached: number;
        cached: TimeRanges;
        duration: number;
        id: string;
        license: CachingTaskLicense;
        parameters: CachingTaskParameters;
        percentageCached: number;
        secondsCached: number;
        source: SourceDescription;
        status: CacheTaskStatus;
        addEventListener<TType extends keyof CachingTaskEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<CachingTaskEventMap[TType]>,
        ): void;
        pause(): void;
        remove(): void;
        removeEventListener<TType extends keyof CachingTaskEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<CachingTaskEventMap[TType]>,
        ): void;
        start(): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    bytes: number

    The estimation of the amount this task will download and store, in bytes.


    - Returns -1 if the estimate is not available yet.

    bytesCached: number

    The amount downloaded and stored, in bytes.

    cached: TimeRanges

    The time ranges cached.

    duration: number

    The requested cached duration of the media, in seconds.

    id: string

    The generated identifier for the task.

    The API for license related queries and operations

    The configuration of the task.

    percentageCached: number

    The percentage cached.

    secondsCached: number

    The duration cached, in seconds.

    The media source associated with the task.

    The current status of the task.

    Methods

    • Pause caching the media.

      Returns void


      - A paused task can be resumed with CachingTask.start.

    • Remove the cached media.

      Returns void

    • Start caching the media.

      Returns void