Class YoutubeTrackFormat


  • public class YoutubeTrackFormat
    extends java.lang.Object
    Describes an available media format for a track
    • Constructor Detail

      • YoutubeTrackFormat

        public YoutubeTrackFormat​(org.apache.http.entity.ContentType type,
                                  long bitrate,
                                  long contentLength,
                                  long audioChannels,
                                  java.lang.String url,
                                  java.lang.String nParameter,
                                  java.lang.String signature,
                                  java.lang.String signatureKey,
                                  boolean isDefaultAudioTrack)
        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
    • Method Detail

      • getInfo

        public YoutubeFormatInfo getInfo()
        Returns:
        Format container and codec info
      • getType

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

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

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

        public java.net.URI getUrl()
        Returns:
        Base URL for the playback of this format
      • getContentLength

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

        public java.lang.String getNParameter()
        Returns:
        n parameter for this format
      • getSignature

        public java.lang.String getSignature()
        Returns:
        Cipher signature for this format
      • getSignatureKey

        public java.lang.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.