Skip to main content
Skip table of contents

Resolution capping

You can configure the OpenTV Player SDK to limit the maximum resolution that the user will experience during playback. The feature works in a similar way to bitrate capping, in that HLS layers above the selected threshold will be dismissed and ignored by the adaptation algorithms. Zero values (default) for width and height will remove any resolution limit.

Example code

NMPAVPlayer 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.

CODE
 (void)setMaxResolution:(CGSize)maxResolution

Resolution caps must be applied before playback or any asset downloading starts.

CODE
NMPAVPlayer* player = [[NMPAVPlayer alloc] init];
[player setMaxResolution:CGSizeMake(640.0, 480.0)];
[player replaceCurrentItemWithPlayerItem:[NMPAVPlayerItem playerItemWithURL:[NSURL URLWithString:urlString]]];
[player play];
  • HLS streams do not need to describe their layers' resolutions. In such a case, the cap is not applied.
  • If the resolution cap is set lower than the lowest layer's resolution, the lowest layer will be played.
  • Any Output Control limitations will take precedence over any user-defined resolution cap that is applied.
  • Applying or removing the limit during playback will only take effect from the start of the next playback.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.