Class QualityLevel
- java.lang.Object
-
- com.longtailvideo.jwplayer.media.adaptive.QualityLevel
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable,java.lang.Comparable<QualityLevel>
public class QualityLevel extends java.lang.Object implements java.lang.Comparable<QualityLevel>, com.longtailvideo.jwplayer.utils.Jsonable
A QualityLevel in a HLS, SmoothStreaming or DASH stream.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAUTO_LABELThe label for the Auto Trackstatic intNO_VALUEMagic constant used when something is unkown.
-
Constructor Summary
Constructors Constructor Description QualityLevel(int width, int height, int bitrate, java.lang.String label, int playlistPosition, int trackIndex)True if this QualityLevel is used to describe that this is an adaptive bitrate stream
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(QualityLevel qualityLevel)static QualityLevelfromJson(org.json.JSONObject jso)intgetBitrate()intgetHeight()java.lang.StringgetLabel()intgetPlaylistPosition()intgetTrackIndex()intgetWidth()static java.util.List<QualityLevel>parseJson(org.json.JSONObject qualityJson)voidsetPlaylistPosition(int index)Marks the position of this quality level within the HLS playlistvoidsetTrackIndex(int trackIndex)org.json.JSONObjecttoJson()java.lang.StringtoString()
-
-
-
Field Detail
-
AUTO_LABEL
public static final java.lang.String AUTO_LABEL
The label for the Auto Track- See Also:
- Constant Field Values
-
NO_VALUE
public static final int NO_VALUE
Magic constant used when something is unkown.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPlaylistPosition
public int getPlaylistPosition()
- Returns:
- The HLS playlist position of this quality level. -1 if "Auto" quality.
-
setPlaylistPosition
public void setPlaylistPosition(int index)
Marks the position of this quality level within the HLS playlist
-
getBitrate
public int getBitrate()
-
getLabel
@Nullable public java.lang.String getLabel()
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
getTrackIndex
public int getTrackIndex()
-
setTrackIndex
public void setTrackIndex(int trackIndex)
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJsonin interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
fromJson
public static QualityLevel fromJson(org.json.JSONObject jso)
-
parseJson
public static java.util.List<QualityLevel> parseJson(org.json.JSONObject qualityJson)
- Parameters:
qualityJson-- Returns:
-
compareTo
public int compareTo(@NonNull QualityLevel qualityLevel)- Specified by:
compareToin interfacejava.lang.Comparable<QualityLevel>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-