public static final class DefaultTrackSelector.Parameters extends Object
DefaultTrackSelector
.Modifier and Type | Field and Description |
---|---|
boolean |
allowMixedMimeAdaptiveness |
boolean |
allowNonSeamlessAdaptiveness |
boolean |
exceedVideoConstraintsIfNecessary |
int |
maxVideoHeight |
int |
maxVideoWidth |
boolean |
orientationMayChange |
String |
preferredAudioLanguage |
String |
preferredTextLanguage |
int |
viewportHeight |
int |
viewportWidth |
Constructor and Description |
---|
Parameters()
Constructor with default selection parameters:
No preferred audio language is set.
No preferred text language is set.
Adaptation between different mime types is not allowed.
Non seamless adaptation is allowed.
No max limit for video width/height.
Video constraints are ignored if no supported selection can be made otherwise.
No viewport width/height constraints are set.
|
Parameters(String preferredAudioLanguage,
String preferredTextLanguage,
boolean allowMixedMimeAdaptiveness,
boolean allowNonSeamlessAdaptiveness,
int maxVideoWidth,
int maxVideoHeight,
boolean exceedVideoConstraintsIfNecessary,
int viewportWidth,
int viewportHeight,
boolean orientationMayChange) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
DefaultTrackSelector.Parameters |
withAllowMixedMimeAdaptiveness(boolean allowMixedMimeAdaptiveness)
Returns a
DefaultTrackSelector.Parameters instance with the provided mixed mime adaptiveness allowance. |
DefaultTrackSelector.Parameters |
withAllowNonSeamlessAdaptiveness(boolean allowNonSeamlessAdaptiveness)
Returns a
DefaultTrackSelector.Parameters instance with the provided seamless adaptiveness allowance. |
DefaultTrackSelector.Parameters |
withExceedVideoConstraintsIfNecessary(boolean exceedVideoConstraintsIfNecessary)
Returns a
DefaultTrackSelector.Parameters instance with the provided
exceedVideoConstraintsIfNecessary value. |
DefaultTrackSelector.Parameters |
withMaxVideoSize(int maxVideoWidth,
int maxVideoHeight)
Returns a
DefaultTrackSelector.Parameters instance with the provided max video size. |
DefaultTrackSelector.Parameters |
withMaxVideoSizeSd()
Equivalent to
withMaxVideoSize(1279, 719) . |
DefaultTrackSelector.Parameters |
withoutVideoSizeConstraints()
Equivalent to
withMaxVideoSize(Integer.MAX_VALUE, Integer.MAX_VALUE) . |
DefaultTrackSelector.Parameters |
withoutViewportSizeConstraints()
Equivalent to
withViewportSize(Integer.MAX_VALUE, Integer.MAX_VALUE, true) . |
DefaultTrackSelector.Parameters |
withPreferredAudioLanguage(String preferredAudioLanguage)
Returns a
DefaultTrackSelector.Parameters instance with the provided preferred language for audio and
forced text tracks. |
DefaultTrackSelector.Parameters |
withPreferredTextLanguage(String preferredTextLanguage)
Returns a
DefaultTrackSelector.Parameters instance with the provided preferred language for text tracks. |
DefaultTrackSelector.Parameters |
withViewportSize(int viewportWidth,
int viewportHeight,
boolean orientationMayChange)
Returns a
DefaultTrackSelector.Parameters instance with the provided viewport size. |
DefaultTrackSelector.Parameters |
withViewportSizeFromContext(Context context,
boolean orientationMayChange)
Returns a
DefaultTrackSelector.Parameters instance where the viewport size is obtained from the provided
Context . |
public final String preferredAudioLanguage
public final String preferredTextLanguage
public final boolean allowMixedMimeAdaptiveness
public final boolean allowNonSeamlessAdaptiveness
public final int maxVideoWidth
public final int maxVideoHeight
public final boolean exceedVideoConstraintsIfNecessary
public final int viewportWidth
public final int viewportHeight
public final boolean orientationMayChange
public Parameters()
public Parameters(String preferredAudioLanguage, String preferredTextLanguage, boolean allowMixedMimeAdaptiveness, boolean allowNonSeamlessAdaptiveness, int maxVideoWidth, int maxVideoHeight, boolean exceedVideoConstraintsIfNecessary, int viewportWidth, int viewportHeight, boolean orientationMayChange)
preferredAudioLanguage
- The preferred language for audio, as well as for forced text
tracks as defined by RFC 5646. null
to select the default track, or first track
if there's no default.preferredTextLanguage
- The preferred language for text tracks as defined by RFC 5646.
null
to select the default track, or first track if there's no default.allowMixedMimeAdaptiveness
- Whether to allow selections to contain mixed mime types.allowNonSeamlessAdaptiveness
- Whether non-seamless adaptation is allowed.maxVideoWidth
- Maximum allowed video width.maxVideoHeight
- Maximum allowed video height.exceedVideoConstraintsIfNecessary
- True to ignore video constraints when no selections
can be made otherwise. False to force constraints anyway.viewportWidth
- Viewport width in pixels.viewportHeight
- Viewport height in pixels.orientationMayChange
- Whether orientation may change during playback.public DefaultTrackSelector.Parameters withPreferredAudioLanguage(String preferredAudioLanguage)
DefaultTrackSelector.Parameters
instance with the provided preferred language for audio and
forced text tracks.preferredAudioLanguage
- The preferred language as defined by RFC 5646. null
to
select the default track, or first track if there's no default.DefaultTrackSelector.Parameters
instance with the provided preferred language for audio and
forced text tracks.public DefaultTrackSelector.Parameters withPreferredTextLanguage(String preferredTextLanguage)
DefaultTrackSelector.Parameters
instance with the provided preferred language for text tracks.preferredTextLanguage
- The preferred language as defined by RFC 5646. null
to
select the default track, or no track if there's no default.DefaultTrackSelector.Parameters
instance with the provided preferred language for text tracks.public DefaultTrackSelector.Parameters withAllowMixedMimeAdaptiveness(boolean allowMixedMimeAdaptiveness)
DefaultTrackSelector.Parameters
instance with the provided mixed mime adaptiveness allowance.allowMixedMimeAdaptiveness
- Whether to allow selections to contain mixed mime types.DefaultTrackSelector.Parameters
instance with the provided mixed mime adaptiveness allowance.public DefaultTrackSelector.Parameters withAllowNonSeamlessAdaptiveness(boolean allowNonSeamlessAdaptiveness)
DefaultTrackSelector.Parameters
instance with the provided seamless adaptiveness allowance.allowNonSeamlessAdaptiveness
- Whether non-seamless adaptation is allowed.DefaultTrackSelector.Parameters
instance with the provided seamless adaptiveness allowance.public DefaultTrackSelector.Parameters withMaxVideoSize(int maxVideoWidth, int maxVideoHeight)
DefaultTrackSelector.Parameters
instance with the provided max video size.maxVideoWidth
- The max video width.maxVideoHeight
- The max video width.DefaultTrackSelector.Parameters
instance with the provided max video size.public DefaultTrackSelector.Parameters withMaxVideoSizeSd()
withMaxVideoSize(1279, 719)
.DefaultTrackSelector.Parameters
instance with maximum standard definition as maximum video size.public DefaultTrackSelector.Parameters withoutVideoSizeConstraints()
withMaxVideoSize(Integer.MAX_VALUE, Integer.MAX_VALUE)
.DefaultTrackSelector.Parameters
instance without video size constraints.public DefaultTrackSelector.Parameters withExceedVideoConstraintsIfNecessary(boolean exceedVideoConstraintsIfNecessary)
DefaultTrackSelector.Parameters
instance with the provided
exceedVideoConstraintsIfNecessary
value.exceedVideoConstraintsIfNecessary
- True to ignore video constraints when no selections
can be made otherwise. False to force constraints anyway.DefaultTrackSelector.Parameters
instance with the provided
exceedVideoConstraintsIfNecessary
value.public DefaultTrackSelector.Parameters withViewportSize(int viewportWidth, int viewportHeight, boolean orientationMayChange)
DefaultTrackSelector.Parameters
instance with the provided viewport size.viewportWidth
- Viewport width in pixels.viewportHeight
- Viewport height in pixels.orientationMayChange
- Whether orientation may change during playback.DefaultTrackSelector.Parameters
instance with the provided viewport size.public DefaultTrackSelector.Parameters withViewportSizeFromContext(Context context, boolean orientationMayChange)
DefaultTrackSelector.Parameters
instance where the viewport size is obtained from the provided
Context
.context
- The context to obtain the viewport size from.orientationMayChange
- Whether orientation may change during playback.DefaultTrackSelector.Parameters
instance where the viewport size is obtained from the provided
Context
.public DefaultTrackSelector.Parameters withoutViewportSizeConstraints()
withViewportSize(Integer.MAX_VALUE, Integer.MAX_VALUE, true)
.DefaultTrackSelector.Parameters
instance without viewport size constraints.