Bitmovin Player API 8.268.0
    Preparing search index...

    Interface RequestController<T>

    This interface can be returned by sendHttpRequest if a custom network request implementation should be provided. The default implementation of the player uses XMLHttpRequest.

    interface RequestController<T extends HttpResponseBody> {
        cancel(): void;
        getResponse(): Promise<HttpResponse<T>>;
        setProgressListener(
            listener: (requestProgress: RequestProgress) => void,
        ): void;
    }

    Type Parameters

    Index
    • Is called by the player if it wants to cancel the current request (e.g. on seek)

      Returns void

    • Returns a Promise that resolves with the actual HttpResponse in case of a 2xx Success HTTP status code. For all other HTTP status codes, the Promise should reject with the HttpResponse.

      Returns Promise<HttpResponse<T>>

    • Provides the data transfer progress to the player (if available).

      Parameters

      Returns void