Class StreamFormat
java.lang.Object
dev.lavalink.youtube.track.format.StreamFormat
Describes an available media format for a track
-
Constructor Summary
ConstructorsConstructorDescriptionStreamFormat(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) -
Method Summary
-
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 formatbitrate- Bitrate of the formatcontentLength- Length in bytes of the mediaaudioChannels- Number of audio channelsurl- Base URL for the playback of this formatnParameter- n parameter for this formatsignature- Cipher signature for this formatsignatureKey- The key to use for deciphered signature in the final playback URLisDefaultAudioTrack- Whether this format contains an audio track that is used by default.isDrc- Whether this format has Dynamic Range Compression.
-
-
Method Details
-
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
- Returns:
- Base URL for the playback of this format
-
getContentLength
public long getContentLength()- Returns:
- Length in bytes of the media
-
getNParameter
- Returns:
- n parameter for this format
-
getSignature
- Returns:
- Cipher signature for this format
-
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
-