THEOplayer Web SDK
    Preparing search index...

    Interface Cache

    The media caching API.


    - Available since v2.26.

    interface Cache {
        network: NetworkInterceptorController;
        status: CacheStatus;
        tasks: CachingTaskList;
        addEventListener<TType extends "statechange">(
            type: TType | readonly TType[],
            listener: EventListener<CacheEventMap[TType]>,
        ): void;
        createTask(
            source: SourceDescription,
            parameters: CachingTaskParameters,
        ): CachingTask;
        removeEventListener<TType extends "statechange">(
            type: TType | readonly TType[],
            listener: EventListener<CacheEventMap[TType]>,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    The cache's network API which allows intercepting requests and responses made by the cache.

    status: CacheStatus

    The current status of the cache.

    List of caching tasks which control the caching of media.

    Methods