HLS - AVPlayerItem, Getting available bitrates in a HLS manifest

Hi,


I want to retrive available bitrates in a HLS manifest from AVPlayerItem. Can anyone suggest whats the right apporach to get his info?,

Though we can fetch this info from changing the scheme of playback url(HLS) and then fetching it in resourceloader, want to know better approach.



Regards,
Santhosh

Accepted Reply

The available bit rates is not something we provide through the API. The basic principle is that decisions about which bit rate to go to are in the hands of the framework, not the application, so the client has no need for this information.


You could intercept this information as you suggest (via resourceLoader). However, you should remember that the framework will filter the list down so the presence of a variant or rendition in the master playlist is no guarantee that it will ever be chosen for playback.

Replies

The available bit rates is not something we provide through the API. The basic principle is that decisions about which bit rate to go to are in the hands of the framework, not the application, so the client has no need for this information.


You could intercept this information as you suggest (via resourceLoader). However, you should remember that the framework will filter the list down so the presence of a variant or rendition in the master playlist is no guarantee that it will ever be chosen for playback.

Agree, though master playlist has a variant with higher bitrates, framework doesn't picks it even if device is connected to a good network . I think framework considers device resolution as well while choosing the variants.

We are seeing few errors in production. I am not sure whats causing it. max errors are coming in AVFoundation unknown error i.e.. 11800. How do we know the root cause for this issue. and also there is no description available for the errors generating from CoreMediaDomain. Like -12881, -16833 with comment "The operation couldn't be completed". Can you please help us to fix these issues or share any doc which provides more info about coreMedia errors.