Gravity

public enum Gravity

An enum that describes how the video is displayed within a layer’s bounds rectangle.

  • The player should preserve the video’s aspect ratio and fill the layer’s bounds.

    Declaration

    Swift

    case aspectFill
  • The player should preserve the video’s aspect ratio and fit the video within the layer’s bounds.

    Declaration

    Swift

    case aspectFit
  • The video should be stretched to fill the layer’s bounds.

    Declaration

    Swift

    case fill