Default selection process
Apple introduced App Transport Security in iOS 9, and strongly encourages the use of HTTPS instead of HTTP for all web traffic. Therefore, the Brightcove default source selection policy is: [BCOVBasicSourceSelectionPolicy sourceSelectionHLSWithScheme:NSURLProtectionSpaceHTTPS].
Brightcove provides a default implementation as follows:
- It looks for the first source that has a
deliveryTypeof HLS using the HTTPS scheme.
- If no such source is found, the first HLS with an HTTP scheme is returned.
- If no HLS sources are present, it will fall back to the first source with a
- If none of the above is found, the first playable source of any kind is returned.
- The source URL is provided to the
- When playback begins, the
AVPlayeris responsible for selecting which bit rate and resolution to serve.
AVPlayerwill start at the first item in the index and adjust accordingly.
When using the default transcode settings, the first HLS source should be the master m3u8 playlist that points to all of your individual renditions.
Alternate source selection policies
You can easily override the default source selection policy if this does not work for you. For details, see the Source Selection section of the Brightcove Player SDK for iOS reference document.
If you want to override which
BCOVSource gets provided to the
AVPlayer, you can implement the
sourceSelectionPolicy block property on the BCOVBasicSessionProviderOptions class.