public interface MediaTrack<Q extends Quality> extends EventDispatcher<TrackEvent>, Track
Modifier and Type | Method and Description |
---|---|
Q |
getActiveQuality()
The active
Quality of the media track, i.e. |
QualityList<Q> |
getQualities()
The qualities of the media track.
|
QualityList<Q> |
getTargetQualities()
The desired qualities of the media track.
|
Q |
getTargetQuality()
The desired quality of the media track.
|
boolean |
isEnabled() |
void |
setEnabled(boolean enabled)
Sets whether the track is enabled.
|
void |
setTargetQualities(List<Q> qualities)
Deprecated.
Superseded by
setTargetQualities(QualityList) , since v2.69.
Sets the target qualities. |
void |
setTargetQualities(QualityList<Q> targetQualities)
Set the target qualities.
|
void |
setTargetQuality(Q quality)
Sets the target quality.
|
getId, getKind, getLabel, getLanguage, getUid
addEventListener, removeEventListener
Q getActiveQuality()
Quality
of the media track, i.e. the quality that is currently being played.QualityList<Q> getQualities()
QualityList
of the media track. (Nullable)Q getTargetQuality()
- The provided quality is a member of the QualityList
of the track.
- When multiple target qualities are present, this method will return the first one from the list.
QualityList<Q> getTargetQualities()
- The provided qualities are members of the QualityList
of the track.
void setTargetQuality(Q quality) throws IllegalArgumentException
quality
- The new Quality
to be set.IllegalArgumentException
- Will be thrown when the given quality is not in the getQualities()
.
- The quality should be a member of the getQualities()
.
@Deprecated void setTargetQualities(List<Q> qualities) throws IllegalArgumentException
setTargetQualities(QualityList)
, since v2.69.
qualities
- The new list of Quality
to be set.IllegalArgumentException
- Will be thrown when the given quality is not in the getQualities()
.
- The qualities should be a member of the getQualities()
.
void setTargetQualities(QualityList<Q> targetQualities) throws IllegalArgumentException
targetQualities
- The new QualityList
to be setIllegalArgumentException
- if any of the given qualities is not in the list of qualities.
- The qualities should be a member of the getQualities()
.
boolean isEnabled()
void setEnabled(boolean enabled)
enabled
- Whether the track should be enabled.- Only one track of the same type (e.g. video) can be enabled at the same time. - Enabling a track will disable all other tracks of the same type. - Disabling a track will not enable a different track of the same type.