Enum Class FormatInfo

java.lang.Object
java.lang.Enum<FormatInfo>
dev.lavalink.youtube.track.format.FormatInfo
All Implemented Interfaces:
Serializable, Comparable<FormatInfo>, Constable

public enum FormatInfo extends Enum<FormatInfo>
The mime type and codec info of a YouTube track format.
  • Enum Constant Details

    • WEBM_OPUS

      public static final FormatInfo WEBM_OPUS
    • WEBM_VORBIS

      public static final FormatInfo WEBM_VORBIS
    • MP4_AAC_LC

      public static final FormatInfo MP4_AAC_LC
    • WEBM_VIDEO_VORBIS

      public static final FormatInfo WEBM_VIDEO_VORBIS
    • MP4_VIDEO_AAC_LC

      public static final FormatInfo MP4_VIDEO_AAC_LC
  • Field Details

    • mimeType

      public final String mimeType
      Mime type of the format
    • codec

      public final String codec
      Codec name of the format
  • Method Details

    • values

      public static FormatInfo[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormatInfo valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      @Nullable public static @Nullable FormatInfo get(@NotNull @NotNull org.apache.http.entity.ContentType contentType)
      Find a matching format info instance from a content type.
      Parameters:
      contentType - The content type to use for matching against known formats
      Returns:
      The format info entry that matches the content type