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.String
AUTO_LABEL
The label for the Auto Trackstatic int
NO_VALUE
Magic 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 int
compareTo(QualityLevel qualityLevel)
static QualityLevel
fromJson(org.json.JSONObject jso)
int
getBitrate()
int
getHeight()
java.lang.String
getLabel()
int
getPlaylistPosition()
int
getTrackIndex()
int
getWidth()
static java.util.List<QualityLevel>
parseJson(org.json.JSONObject qualityJson)
void
setPlaylistPosition(int index)
Marks the position of this quality level within the HLS playlistvoid
setTrackIndex(int trackIndex)
org.json.JSONObject
toJson()
java.lang.String
toString()
-
-
-
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:
toJson
in 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:
compareTo
in interfacejava.lang.Comparable<QualityLevel>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-