AspectRatio

@objc(THEOplayerAspectRatio)
public enum AspectRatio : Int

Specifies an aspect ratio for the player when in fullscreen mode.

  • fit

    Scales the theoplayer so that all content fits inside its bounding box, keeping the original aspect ratio of the content.

    Remark

    This might result in black bars on the side if aspect ratio of the content does not match the screen. The content will never be cropped.

    Declaration

    Swift

    @objc(THEOplayerAspectRatioFIT)
    case fit = 1
  • Scales the theoplayer so that all content fits inside the bounding box which will be stretched to fill the entire bounding box.

    Remark

    This does not keep the original aspect ratio, content may look stretched out. Will not show black bars. The content will not be cropped.

    Declaration

    Swift

    @objc(THEOplayerAspectRatioFILL)
    case fill = 2
  • Scales the theoplayer so that the content fills up the entire bounding box, keeping the original aspect ratio of the content.

    Remark

    This might result in cropped content. It will never show black bars.

    Declaration

    Swift

    @objc(THEOplayerAspectRatioASPECT_FILL)
    case aspectFill = 3