Version: 2.69.0

NetworkInterceptorController

THEOplayer > NetworkInterceptorController

NetworkInterceptorController interface

Network interceptor API which can be used to intercept network requests and responses.

Signature:
export interface NetworkInterceptorController

Methods

MethodDescription
addRequestInterceptor(interceptor)Add a request interceptor.
addResponseInterceptor(interceptor)Add a response interceptor.
removeRequestInterceptor(interceptor)Remove a request interceptor.
removeResponseInterceptor(interceptor)Remove a response interceptor.

Remarks


- Request interceptors will be executed in the order they were added.
- [InterceptableRequest.respondWith()](/docs/api-reference/theoplayer-interceptablerequest-respondwith) can be called at most once, otherwise an error will be thrown.