I set a simple player with Bitmovin player iOS like this:
func bind(videoPlayer: BitmovinPlayer.Player, url: URL) {
// Update variables
self.videoPlayer = videoPlayer
self.videoPlayer?.add(listener: self)
self.videoPlayer?.config.networkConfiguration.preprocessHttpRequestDelegate = self
self.url = url
let analyticsConfig = BitmovinAnalyticsConfig(key: Constant.BitmovinAnalytics.LICENSE_KEY)
analyticsConfig.isLive = episode?.liveValue ?? false
analyticsCollector = BitmovinPlayerCollector(config: analyticsConfig)
analyticsCollector.attachPlayer(player: videoPlayer)
}
This method builds the player, but when I run a video the following method does not trigger the delegate:
func preprocessHttpRequest(_ type: String, httpRequest: HttpRequest, completionHandler: @escaping (HttpRequest) -> Void)
Other listeners work as expected.
Somebody had the same issue? I follow all the runcode looking for duplicate delegates but I just set the player once. No documentation or examples found for this feature.
On iOS, the
preprocessHttpRequest
is only supported for DRM requests (like DRM license acquisition) as per the Bitmovin Player iOS API documentation https://bitmovin.com/docs/player/api-reference/ios/ios-sdk-api-reference-v3#/player/ios/3/docs/Protocols/PreprocessHttpRequestDelegate.html: