Resolution capping

You can configure the Player for Android SDK to limit the maximum resolution that the user will experience during playback. The feature works in a very similar way to bitrate capping, in that HLS layers or DASH renditions above the selected threshold will be dismissed and ignored by the adaptation algorithms.

Example code

NMPVideoView 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:

  public void setMaxResolution(int width, int height)

Note the special values of zero for width and height will remove any resolution limit. These are the default values.

These settings are persisted for the lifecycle of the player, and so they apply to every stream played once they are set.

Limitations

  • Unlike with DASH streams, it is not mandatory for HLS streams to describe their layers' resolutions. In such a case the cap is not applied.

  • If the resolution cap is set lower than the resolution of the lowest rendition, then that lowest rendition 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 take effect after the buffered duration has been consumed.