iOS/tvOS SDK 3.27.0 and later cannot play our HLS streams (SourceError)

We cannot play any HLS content in our tvOS app using SDK 3.27.0 or newer (the last SDK that works is 3.26.0). Instead of starting playback, the player calls onSourceError method of PlayerListener immediately after initialization. The SourceError does not contain any additional information. Here is the sample of our HLS manifest:

## Created with Unified Streaming Platform(version=1.7.32)

# variants

I am also attaching the stack trace of the moment when onSourceError is called by SDK 3.34.0.

Thanks a lot for your support

Hey @milan.moucka,
So older player versions (e.g. 3.26.0) work fine with this stream?

From just the multivariant playlist, it’s hard to say what the problem is. The only thing I noticed from this is that this stream uses EXT-X-VERSION:2, which is very old version of HLS. Is there a technical reason you’re using that? Unified Streaming should be able to easily provide newer versions as well.

Is it possible for you to provide a link to this stream in order to runs some tests? If you don’t want to or can’t share it publicly, feel free to send me a direct message with it.

Hi @daniel,

thanks a lot for your response.

We also checked these two streams:
it uses version 3 and

Both URLs cannot be played in Bitmovin 3.27.0 and newer but can be played in Bitmovin 3.26.0.

If you need additional information about something, I can provide.

Thanks a lot

Hi @milan.moucka,

I tested and could play both streams just fine with Bitmovin Player 3.27.0 as well as with the latest 3.34.1 on tvOS. A note for these second URL: you might need to change http: to https: in order to play it.

Can you please test if you are able to play those two streams in bitmovin-player-ios-samples/BasicPlaybackTV at main · bitmovin/bitmovin-player-ios-samples · GitHub to rule out any app integration issue?

Which tvOS version are you testing on?

Hi @daniel

Thank you for sharing the link to the sample app with sample HLS stream. We noticed that we are unable to play any HLS stream in our app (tested on tvOS 16.1).
The cause was found in reading the duration property of the AVURLAsset of the currently played item. In SDK 3.27.0 and later accessing AVAsset.duration property freezes the app for a few seconds and then we get SourceError mentioned earlier. For your information, we read the duration of AVURLAsset when _BMPAVPlayer.status (observed using KVO) changes to .readyToPlay .

We will fix the issue on our side.

Once again. Thank you :blush:

Hi @milan.moucka,
Glad you could figure it out.

However, I wanted to highlight that we strongly discourage using or accessing the Bitmovin Player’s underlying AVPlayer instance directly. This isn’t a supported use case and can lead to many unforeseen side effects (like the one you just encountered)! Access to it might also be removed completely in the future, without further notice.

Please use the Bitmovin Player’s API instead, you can find the API reference here: Bitmovin Docs - Player iOS SDK API Reference v3
For example, you can get the duration of a source from Source.duration. If you find any information missing from the Bitmovin Player API, please do let us know!