Class StreamFormat

java.lang.Object
dev.lavalink.youtube.track.format.StreamFormat

public class StreamFormat extends Object
Describes an available media format for a track
  • Constructor Details

    • StreamFormat

      public StreamFormat(org.apache.http.entity.ContentType type, int itag, long bitrate, long contentLength, long audioChannels, String url, String nParameter, String signature, String signatureKey, boolean isDefaultAudioTrack, boolean isDrc)
      Parameters:
      type - Mime type of the format
      bitrate - Bitrate of the format
      contentLength - Length in bytes of the media
      audioChannels - Number of audio channels
      url - Base URL for the playback of this format
      nParameter - n parameter for this format
      signature - Cipher signature for this format
      signatureKey - The key to use for deciphered signature in the final playback URL
      isDefaultAudioTrack - Whether this format contains an audio track that is used by default.
      isDrc - Whether this format has Dynamic Range Compression.
  • Method Details

    • getInfo

      @Nullable public @Nullable FormatInfo getInfo()
      Returns:
      Format container and codec info
    • getType

      @NotNull public @NotNull org.apache.http.entity.ContentType getType()
      Returns:
      Mime type of the format
    • getItag

      public int getItag()
    • getBitrate

      public long getBitrate()
      Returns:
      Bitrate of the format
    • getAudioChannels

      public long getAudioChannels()
      Returns:
      Count of audio channels in format
    • getUrl

      @NotNull public @NotNull URI getUrl()
      Returns:
      Base URL for the playback of this format
    • getContentLength

      public long getContentLength()
      Returns:
      Length in bytes of the media
    • getNParameter

      @Nullable public @Nullable String getNParameter()
      Returns:
      n parameter for this format
    • getSignature

      @Nullable public @Nullable String getSignature()
      Returns:
      Cipher signature for this format
    • getSignatureKey

      @Nullable public @Nullable String getSignatureKey()
      Returns:
      The key to use for deciphered signature in the final playback URL
    • isDefaultAudioTrack

      public boolean isDefaultAudioTrack()
      Returns:
      Whether this format contains an audio track that is used by default.
    • isDrc

      public boolean isDrc()
      Returns:
      Whether this format has Dynamic Range Compression.
    • toString

      public String toString()
      Overrides:
      toString in class Object