THEOplayer Web SDK
    Preparing search index...

    Interface Network

    The network API.


    - Available since v2.21.0.

    interface Network {
        estimator: NetworkEstimator;
        online: boolean;
        addEventListener<TType extends keyof NetworkEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<NetworkEventMap[TType]>,
        ): void;
        addRequestInterceptor(interceptor: RequestInterceptor): void;
        addResponseInterceptor(interceptor: ResponseInterceptor): void;
        removeEventListener<TType extends keyof NetworkEventMap>(
            type: TType | readonly TType[],
            listener: EventListener<NetworkEventMap[TType]>,
        ): void;
        removeRequestInterceptor(interceptor: RequestInterceptor): void;
        removeResponseInterceptor(interceptor: ResponseInterceptor): void;
        setEstimator(estimator: undefined | MeasurableNetworkEstimator): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    estimator: NetworkEstimator

    Returns the active MeasurableNetworkEstimator. An internal implementation is provided by default.

    online: boolean

    Whether the stream is online.

    Methods