Enum VideoScalingType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<VideoScalingType>

    public enum VideoScalingType
    extends java.lang.Enum<VideoScalingType>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ASPECT_BALANCED
      Compromise between ASPECT_FIT and ASPECT_FILL.
      ASPECT_FILL
      Video frame is scaled to fill the size of the view while maintaining the aspect ratio.
      ASPECT_FIT
      Video frame is scaled to fit the size of the view while maintaining the aspect ratio.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static VideoScalingType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static VideoScalingType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ASPECT_FIT

        public static final VideoScalingType ASPECT_FIT
        Video frame is scaled to fit the size of the view while maintaining the aspect ratio. Transparent borders may be displayed.
      • ASPECT_FILL

        public static final VideoScalingType ASPECT_FILL
        Video frame is scaled to fill the size of the view while maintaining the aspect ratio. Some portion of the video frame may be clipped.
      • ASPECT_BALANCED

        public static final VideoScalingType ASPECT_BALANCED
        Compromise between ASPECT_FIT and ASPECT_FILL. Video frame will fill as much of the view as possible while maintaining aspect ratio, as long as at least 56% of the frame content will be shown.
    • Method Detail

      • values

        public static VideoScalingType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (VideoScalingType c : VideoScalingType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static VideoScalingType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null