Resolution capping
To test this feature and view the example code, please see the Apple (FPS) SDK 5 Example Code Quick Start guide.
This feature enables you to configure the CONNECT Player SDK to limit the maximum resolution users will experience during playback. HLS layers above the selected threshold will be dismissed and ignored by the adaptation algorithms.
Example code
OTVAVPlayer
has a public API that lets you configure this feature by specifying the width and height (in pixels) at which the cap will be applied. Zero values (default) for width and height will remove any resolution limit.
let maxResolution = CGSize(width: 1280, height: 720)
otvPlayer.currentItem?.preferredMaximumResolution = maxResolution
If the maximum resolution provided is below the lowest available resolution in the stream,
OTVAVPlayer
will select the lowest possible resolution above the set limit.Changing the maximum resolution might not take effect immediately as the player may already have some content buffered and ready to play.
HLS streams do not need to describe their layers’ resolutions, in which case the cap is not applied.