Bitmovin player crashes on iOS 16

Hi Bitmovin,
I am experiencing a crash on iOS 16. When a url is not playing and we got error and user remains on the same screen and taps on play and pause button it cause a crash saying
BitmovinPlayer/DefaultSeekingService.swift:233: Fatal error: Current source cannot be nil.

  guard !streamingUrl.isEmpty, let streamUrl = URL(string: streamingUrl.removingPercentEncoding ?? "") else {

        let config = PlayerConfig()
        config.styleConfig.userInterfaceType = .system
        config.playbackConfig.isAutoplayEnabled = true
        config.playbackConfig.isPictureInPictureEnabled = true
        config.playbackConfig.isBackgroundPlaybackEnabled = true
        config.tweaksConfig.isCustomHlsLoadingEnabled = false
        config.tweaksConfig.isNativeHlsParsingEnabled = true
        let player = PlayerFactory.create(playerConfig: config)
        let playerView = PlayerView(player: player, frame: .zero)
        playerView.fullscreenHandler = self
        player.add(listener: self)
        playerView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
        playerView.frame = view.bounds
        self.playerView = playerView
        self.player = player

        // Bitmovin Analytics Configuration on intialization
        if let title = appointmentTitle,
           let apptId = appointmentId,
           let deviceUUID = CNUserDefaultManger.shared.object(forKey: UserDefaultConstant.deviceUUID.rawValue) as? String,
           let customUserId = MyProfileRepository.getMyProfile()?.basicProfile?.integrationId {
            analyticsConfig = BitmovinAnalyticsConfig(key: "myKey")
            analyticsConfig?.customData1 = deviceUUID
            analyticsConfig?.customData2 = String(apptId)
            analyticsConfig?.customData3 = defaultConfCode
            analyticsConfig?.customerUserId = customUserId
            analyticsConfig?.videoId = streamingUrl.removingPercentEncoding
            analyticsConfig?.title = title
            if let config = analyticsConfig {
                analyticsCollector = BitmovinPlayerCollector(config: config)
        let sourceConfig = SourceConfig(url: streamUrl, type: .hls)
        let source = SourceFactory.create(from: sourceConfig)
        source.add(listener: self)
        self.player?.load(source: source)

It’s working fine on iOS 15 but on on 16 both iPhone as well iPad we are experiencing this issue.

Hey @abichal.jha,

thank you for raising the issue. We were able to reproduce the issue on iOS 16.

It looks like there is a slight change in how the new System UI behaves when there is no Source loaded in the player.

We have already identified a fix which will be part of one of our upcoming releases.

Another slight note on your configuration setup:

config.tweaksConfig.isCustomHlsLoadingEnabled = false
config.tweaksConfig.isNativeHlsParsingEnabled = true

When isCustomHlsLoadingEnabled is set to false, isNativeHlsParsingEnabled does not have any effect and will be disabled.

This is stated in the documentation of isCustomHlsLoadingEnabled, though I can see a slight glitch how the documentation is rendered there. (The last bullet point should be split into multiple)

If set to false , enabling nativeHlsParsingEnabled won’t have any effect.

Hey @davidsteinacher,
Thank you, i will update my configuration.

This was fixed in 3.31.0.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.