public final class

DefaultTrackSelector.Parameters

extends TrackSelectionParameters

implements Bundleable

 java.lang.Object

androidx.media3.common.TrackSelectionParameters

↳androidx.media3.exoplayer.trackselection.DefaultTrackSelector.Parameters

Overview

Extends DefaultTrackSelector.Parameters by adding fields that are specific to DefaultTrackSelector.

Summary

Fields
public final booleanallowAudioMixedChannelCountAdaptiveness

Whether to allow adaptive audio selections containing mixed channel counts.

public final booleanallowAudioMixedDecoderSupportAdaptiveness

Whether to allow adaptive audio selections with mixed levels of and .

public final booleanallowAudioMixedMimeTypeAdaptiveness

Whether to allow adaptive audio selections containing mixed MIME types.

public final booleanallowAudioMixedSampleRateAdaptiveness

Whether to allow adaptive audio selections containing mixed sample rates.

public final booleanallowMultipleAdaptiveSelections

Whether multiple adaptive selections with more than one track are allowed.

public final booleanallowVideoMixedDecoderSupportAdaptiveness

Whether to allow adaptive video selections with mixed levels of and .

public final booleanallowVideoMixedMimeTypeAdaptiveness

Whether to allow adaptive video selections containing mixed MIME types.

public final booleanallowVideoNonSeamlessAdaptiveness

Whether to allow adaptive video selections where adaptation may not be completely seamless.

public static final Bundleable.Creator<DefaultTrackSelector.Parameters>CREATOR

Object that can restore Parameters from a .

public static final DefaultTrackSelector.ParametersDEFAULT

public static final DefaultTrackSelector.ParametersDEFAULT_WITHOUT_CONTEXT

An instance with default values, except those obtained from the .

public final intdisabledTextTrackSelectionFlags

Bitmask of selection flags that are disabled for text track selections.

public final booleanexceedAudioConstraintsIfNecessary

Whether to exceed the TrackSelectionParameters.maxAudioChannelCount and TrackSelectionParameters.maxAudioBitrate constraints when no selection can be made otherwise.

public final booleanexceedRendererCapabilitiesIfNecessary

Whether to exceed renderer capabilities when no selection can be made otherwise.

public final booleanexceedVideoConstraintsIfNecessary

Whether to exceed the TrackSelectionParameters.maxVideoWidth, TrackSelectionParameters.maxVideoHeight and TrackSelectionParameters.maxVideoBitrate constraints when no selection can be made otherwise.

public final booleantunnelingEnabled

Whether to enable tunneling if possible.

from TrackSelectionParametersdisabledTrackTypes, forceHighestSupportedBitrate, forceLowestBitrate, maxAudioBitrate, maxAudioChannelCount, maxVideoBitrate, maxVideoFrameRate, maxVideoHeight, maxVideoWidth, minVideoBitrate, minVideoFrameRate, minVideoHeight, minVideoWidth, preferredAudioLanguages, preferredAudioMimeTypes, preferredAudioRoleFlags, preferredTextLanguages, preferredTextRoleFlags, preferredVideoMimeTypes, preferredVideoRoleFlags, selectUndeterminedTextLanguage, trackSelectionOverrides, viewportHeight, viewportOrientationMayChange, viewportWidth
Methods
public DefaultTrackSelector.ParametersBuilderbuildUpon()

Creates a new DefaultTrackSelector.ParametersBuilder, copying the initial values from this instance.

public booleanequals(java.lang.Object obj)

public static DefaultTrackSelector.ParametersgetDefaults(Context context)

Returns an instance configured with default values.

public final booleangetRendererDisabled(int rendererIndex)

Returns whether the renderer is disabled.

public final DefaultTrackSelector.SelectionOverridegetSelectionOverride(int rendererIndex, TrackGroupArray groups)

Returns the override for the specified renderer and TrackGroupArray.

public inthashCode()

public final booleanhasSelectionOverride(int rendererIndex, TrackGroupArray groups)

Returns whether there is an override for the specified renderer and TrackGroupArray.

public BundletoBundle()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public static final DefaultTrackSelector.Parameters DEFAULT_WITHOUT_CONTEXT

An instance with default values, except those obtained from the .

If possible, use DefaultTrackSelector.Parameters.getDefaults(Context) instead.

This instance will not have the following settings:

public static final DefaultTrackSelector.Parameters DEFAULT

Deprecated: This instance is not configured using constraints. Use DefaultTrackSelector.Parameters.getDefaults(Context) instead.

public final int disabledTextTrackSelectionFlags

Bitmask of selection flags that are disabled for text track selections. See . The default value is 0 (i.e. no flags).

public final boolean exceedVideoConstraintsIfNecessary

Whether to exceed the TrackSelectionParameters.maxVideoWidth, TrackSelectionParameters.maxVideoHeight and TrackSelectionParameters.maxVideoBitrate constraints when no selection can be made otherwise. The default value is true.

public final boolean allowVideoMixedMimeTypeAdaptiveness

Whether to allow adaptive video selections containing mixed MIME types. Adaptations between different MIME types may not be completely seamless, in which case DefaultTrackSelector.Parameters.allowVideoNonSeamlessAdaptiveness also needs to be true for mixed MIME type selections to be made. The default value is false.

public final boolean allowVideoNonSeamlessAdaptiveness

Whether to allow adaptive video selections where adaptation may not be completely seamless. The default value is true.

public final boolean allowVideoMixedDecoderSupportAdaptiveness

Whether to allow adaptive video selections with mixed levels of and .

public final boolean exceedAudioConstraintsIfNecessary

Whether to exceed the TrackSelectionParameters.maxAudioChannelCount and TrackSelectionParameters.maxAudioBitrate constraints when no selection can be made otherwise. The default value is true.

public final boolean allowAudioMixedMimeTypeAdaptiveness

Whether to allow adaptive audio selections containing mixed MIME types. Adaptations between different MIME types may not be completely seamless. The default value is false.

public final boolean allowAudioMixedSampleRateAdaptiveness

Whether to allow adaptive audio selections containing mixed sample rates. Adaptations between different sample rates may not be completely seamless. The default value is false.

public final boolean allowAudioMixedChannelCountAdaptiveness

Whether to allow adaptive audio selections containing mixed channel counts. Adaptations between different channel counts may not be completely seamless. The default value is false.

public final boolean allowAudioMixedDecoderSupportAdaptiveness

Whether to allow adaptive audio selections with mixed levels of and .

public final boolean exceedRendererCapabilitiesIfNecessary

Whether to exceed renderer capabilities when no selection can be made otherwise.

This parameter applies when all of the tracks available for a renderer exceed the renderer's reported capabilities. If the parameter is true then the lowest quality track will still be selected. Playback may succeed if the renderer has under-reported its true capabilities. If false then no track will be selected. The default value is true.

public final boolean tunnelingEnabled

Whether to enable tunneling if possible.

public final boolean allowMultipleAdaptiveSelections

Whether multiple adaptive selections with more than one track are allowed. The default value is true.

Note that tracks are only eligible for adaptation if they define a bitrate, the renderers support the tracks and allow adaptation between them, and they are not excluded based on other track selection parameters.

public static final Bundleable.Creator<DefaultTrackSelector.Parameters> CREATOR

Object that can restore Parameters from a .

Methods

public static DefaultTrackSelector.Parameters getDefaults(Context context)

Returns an instance configured with default values.

public final boolean getRendererDisabled(int rendererIndex)

Returns whether the renderer is disabled.

Parameters:

rendererIndex: The renderer index.

Returns:

Whether the renderer is disabled.

public final boolean hasSelectionOverride(int rendererIndex, TrackGroupArray groups)

Deprecated: Only works to retrieve the overrides set with the deprecated DefaultTrackSelector.ParametersBuilder. Use TrackSelectionParameters.trackSelectionOverrides instead.

Returns whether there is an override for the specified renderer and TrackGroupArray.

Parameters:

rendererIndex: The renderer index.
groups: The TrackGroupArray.

Returns:

Whether there is an override.

public final DefaultTrackSelector.SelectionOverride getSelectionOverride(int rendererIndex, TrackGroupArray groups)

Deprecated: Only works to retrieve the overrides set with the deprecated DefaultTrackSelector.ParametersBuilder. Use TrackSelectionParameters.trackSelectionOverrides instead.

Returns the override for the specified renderer and TrackGroupArray.

Parameters:

rendererIndex: The renderer index.
groups: The TrackGroupArray.

Returns:

The override, or null if no override exists.

Creates a new DefaultTrackSelector.ParametersBuilder, copying the initial values from this instance.

public boolean equals(java.lang.Object obj)

public int hashCode()

public Bundle toBundle()