Interface Network

The network API.


- Available since v2.21.0.

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

Hierarchy (view full)

Properties

estimator: NetworkEstimator

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

online: boolean

Whether the stream is online.

Methods