PreprocessHttpRequestDelegate

@objc(BMPPreprocessHttpRequestDelegate)
public protocol PreprocessHttpRequestDelegate

Can be used to change request parameters before a request is made.

Only changing DRM and HLS Playlist requests are currently supported.

  • Can be used to change request parameters before a request is made.

    Only changing DRM and HLS Playlist requests are currently supported.

    Declaration

    Swift

    @objc
    func preprocessHttpRequest(
        _ type: String,
        httpRequest: HttpRequest,
        completionHandler: @escaping (_ httpRequest: HttpRequest) -> Void
    )

    Parameters

    type

    Type of the request to be made. Possible values are defined in BMPHttpRequestTypes.h.

    httpRequest

    Config object of the request.

    completionHandler

    Completion handler which must be called with the modified BMPHttpRequest. Not calling the completion handler prevents the HTTP request from being sent at all and blocks the player.