public static final class DefaultTrackSelector.Parameters extends Object
DefaultTrackSelector
.Modifier and Type | Field and Description |
---|---|
boolean |
allowMixedMimeAdaptiveness
Whether to allow adaptive selections containing mixed mime types.
|
boolean |
allowNonSeamlessAdaptiveness
Whether to allow adaptive selections where adaptation may not be completely seamless.
|
boolean |
exceedRendererCapabilitiesIfNecessary
Whether to exceed renderer capabilities when no selection can be made otherwise.
|
boolean |
exceedVideoConstraintsIfNecessary
Whether to exceed video constraints when no selection can be made otherwise.
|
int |
maxVideoBitrate
Maximum video bitrate.
|
int |
maxVideoHeight
Maximum allowed video height.
|
int |
maxVideoWidth
Maximum allowed video width.
|
String |
preferredAudioLanguage
The preferred language for audio, as well as for forced text tracks as defined by RFC 5646.
|
String |
preferredTextLanguage
The preferred language for text tracks as defined by RFC 5646.
|
int |
viewportHeight
Viewport height in pixels.
|
boolean |
viewportOrientationMayChange
Whether the viewport orientation may change during playback.
|
int |
viewportWidth
Viewport width in pixels.
|
Constructor and Description |
---|
Parameters()
Default parameters.
|
Parameters(String preferredAudioLanguage,
String preferredTextLanguage,
boolean allowMixedMimeAdaptiveness,
boolean allowNonSeamlessAdaptiveness,
int maxVideoWidth,
int maxVideoHeight,
int maxVideoBitrate,
boolean exceedVideoConstraintsIfNecessary,
boolean exceedRendererCapabilitiesIfNecessary,
int viewportWidth,
int viewportHeight,
boolean viewportOrientationMayChange) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
DefaultTrackSelector.Parameters |
withAllowMixedMimeAdaptiveness(boolean allowMixedMimeAdaptiveness)
Returns an instance with the provided mixed mime adaptiveness allowance.
|
DefaultTrackSelector.Parameters |
withAllowNonSeamlessAdaptiveness(boolean allowNonSeamlessAdaptiveness)
Returns an instance with the provided seamless adaptiveness allowance.
|
DefaultTrackSelector.Parameters |
withExceedRendererCapabilitiesIfNecessary(boolean exceedRendererCapabilitiesIfNecessary)
Returns an instance with the provided
exceedRendererCapabilitiesIfNecessary value. |
DefaultTrackSelector.Parameters |
withExceedVideoConstraintsIfNecessary(boolean exceedVideoConstraintsIfNecessary)
Returns an instance with the provided
exceedVideoConstraintsIfNecessary value. |
DefaultTrackSelector.Parameters |
withMaxVideoBitrate(int maxVideoBitrate)
Returns an instance with the provided max video bitrate.
|
DefaultTrackSelector.Parameters |
withMaxVideoSize(int maxVideoWidth,
int maxVideoHeight)
Returns an 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 an instance with the provided preferred language for audio and forced text tracks.
|
DefaultTrackSelector.Parameters |
withPreferredTextLanguage(String preferredTextLanguage)
Returns an instance with the provided preferred language for text tracks.
|
DefaultTrackSelector.Parameters |
withViewportSize(int viewportWidth,
int viewportHeight,
boolean viewportOrientationMayChange)
Returns an instance with the provided viewport size.
|
DefaultTrackSelector.Parameters |
withViewportSizeFromContext(Context context,
boolean viewportOrientationMayChange)
Returns an instance where the viewport size is obtained from the provided
Context . |
public final String preferredAudioLanguage
null
selects the default track, or the first track if there's no default.public final String preferredTextLanguage
null
selects the
default track if there is one, or no track otherwise.public final int maxVideoWidth
public final int maxVideoHeight
public final int maxVideoBitrate
public final boolean exceedVideoConstraintsIfNecessary
public final int viewportWidth
public final int viewportHeight
public final boolean viewportOrientationMayChange
public final boolean allowMixedMimeAdaptiveness
public final boolean allowNonSeamlessAdaptiveness
public final boolean exceedRendererCapabilitiesIfNecessary
public Parameters()
public Parameters(String preferredAudioLanguage, String preferredTextLanguage, boolean allowMixedMimeAdaptiveness, boolean allowNonSeamlessAdaptiveness, int maxVideoWidth, int maxVideoHeight, int maxVideoBitrate, boolean exceedVideoConstraintsIfNecessary, boolean exceedRendererCapabilitiesIfNecessary, int viewportWidth, int viewportHeight, boolean viewportOrientationMayChange)
preferredAudioLanguage
- See preferredAudioLanguage
preferredTextLanguage
- See preferredTextLanguage
allowMixedMimeAdaptiveness
- See allowMixedMimeAdaptiveness
allowNonSeamlessAdaptiveness
- See allowNonSeamlessAdaptiveness
maxVideoWidth
- See maxVideoWidth
maxVideoHeight
- See maxVideoHeight
maxVideoBitrate
- See maxVideoBitrate
exceedVideoConstraintsIfNecessary
- See exceedVideoConstraintsIfNecessary
exceedRendererCapabilitiesIfNecessary
- See preferredTextLanguage
viewportWidth
- See viewportWidth
viewportHeight
- See viewportHeight
viewportOrientationMayChange
- See viewportOrientationMayChange
public DefaultTrackSelector.Parameters withPreferredAudioLanguage(String preferredAudioLanguage)
preferredAudioLanguage
- The preferred language as defined by RFC 5646. null
to
select the default track, or first track if there's no default.public DefaultTrackSelector.Parameters withPreferredTextLanguage(String preferredTextLanguage)
preferredTextLanguage
- The preferred language as defined by RFC 5646. null
to
select the default track, or no track if there's no default.public DefaultTrackSelector.Parameters withAllowMixedMimeAdaptiveness(boolean allowMixedMimeAdaptiveness)
allowMixedMimeAdaptiveness
- Whether to allow selections to contain mixed mime types.public DefaultTrackSelector.Parameters withAllowNonSeamlessAdaptiveness(boolean allowNonSeamlessAdaptiveness)
allowNonSeamlessAdaptiveness
- Whether non-seamless adaptation is allowed.public DefaultTrackSelector.Parameters withMaxVideoSize(int maxVideoWidth, int maxVideoHeight)
maxVideoWidth
- The max video width.maxVideoHeight
- The max video width.public DefaultTrackSelector.Parameters withMaxVideoBitrate(int maxVideoBitrate)
maxVideoBitrate
- The max video bitrate.public DefaultTrackSelector.Parameters withMaxVideoSizeSd()
withMaxVideoSize(1279, 719)
.public DefaultTrackSelector.Parameters withoutVideoSizeConstraints()
withMaxVideoSize(Integer.MAX_VALUE, Integer.MAX_VALUE)
.public DefaultTrackSelector.Parameters withExceedVideoConstraintsIfNecessary(boolean exceedVideoConstraintsIfNecessary)
exceedVideoConstraintsIfNecessary
value.exceedVideoConstraintsIfNecessary
- Whether to exceed video constraints when no
selection can be made otherwise.exceedVideoConstraintsIfNecessary
value.public DefaultTrackSelector.Parameters withExceedRendererCapabilitiesIfNecessary(boolean exceedRendererCapabilitiesIfNecessary)
exceedRendererCapabilitiesIfNecessary
value.exceedRendererCapabilitiesIfNecessary
- Whether to exceed renderer capabilities when no
selection can be made otherwise.exceedRendererCapabilitiesIfNecessary
value.public DefaultTrackSelector.Parameters withViewportSize(int viewportWidth, int viewportHeight, boolean viewportOrientationMayChange)
viewportWidth
- Viewport width in pixels.viewportHeight
- Viewport height in pixels.viewportOrientationMayChange
- Whether orientation may change during playback.public DefaultTrackSelector.Parameters withViewportSizeFromContext(Context context, boolean viewportOrientationMayChange)
Context
.context
- The context to obtain the viewport size from.viewportOrientationMayChange
- Whether orientation may change during playback.Context
.public DefaultTrackSelector.Parameters withoutViewportSizeConstraints()
withViewportSize(Integer.MAX_VALUE, Integer.MAX_VALUE, true)
.