DefaultTrackSelector.Parameters


class DefaultTrackSelector.Parameters : TrackSelectionParameters


Extends Parameters by adding fields that are specific to DefaultTrackSelector.

Summary

Constants

const DefaultTrackSelector.Parameters!

This property is deprecated.

This instance is not configured using Context constraints.

const DefaultTrackSelector.Parameters!

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

Public functions

DefaultTrackSelector.Parameters.Builder!

Creates a new Parameters.Builder, copying the initial values from this instance.

Boolean
equals(obj: Any?)
java-static DefaultTrackSelector.Parameters!
fromBundle(bundle: Bundle!)

Restores a Parameters from a Bundle.

java-static DefaultTrackSelector.Parameters!
getDefaults(context: Context!)

Returns an instance configured with default values.

Boolean
getRendererDisabled(rendererIndex: Int)

Returns whether the renderer is disabled.

DefaultTrackSelector.SelectionOverride?
getSelectionOverride(rendererIndex: Int, groups: TrackGroupArray!)

This function is deprecated.

Only works to retrieve the overrides set with the deprecated setSelectionOverride.

Boolean
hasSelectionOverride(rendererIndex: Int, groups: TrackGroupArray!)

This function is deprecated.

Only works to retrieve the overrides set with the deprecated setSelectionOverride.

Int
Bundle!

Public properties

Boolean

Whether to allow adaptive audio selections containing mixed channel counts.

Boolean

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

Boolean

Whether to allow adaptive audio selections containing mixed MIME types.

Boolean

Whether to allow adaptive audio selections containing mixed sample rates.

Boolean

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

Boolean

Whether to allow to invalidate selections on renderer capabilities change.

Boolean

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

Boolean

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

Boolean

Whether to allow adaptive video selections containing mixed MIME types.

Boolean

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

Boolean

Whether to constrain audio track selection so that the selected track's channel count does not exceed the device's output capabilities.

Boolean

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

Boolean

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

Boolean

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

Boolean

Whether to enable tunneling if possible.

Inherited Constants

From androidx.media3.common.TrackSelectionParameters
const TrackSelectionParameters!

This property is deprecated.

This instance is not configured using Context constraints.

const TrackSelectionParameters!

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

const Int

Defines a minimum field ID value for subclasses to use when implementing toBundle and delegating to Builder.

Inherited functions

From androidx.media3.common.TrackSelectionParameters
java-static TrackSelectionParameters!
fromBundle(bundle: Bundle!)

Construct an instance from a Bundle produced by toBundle.

java-static TrackSelectionParameters!
getDefaults(context: Context!)

Returns an instance configured with default values.

Inherited properties

From androidx.media3.common.TrackSelectionParameters
TrackSelectionParameters.AudioOffloadPreferences!

The preferred offload mode settings for audio playback.

ImmutableSet<@C.TrackType Int!>!

The track types that are disabled.

Boolean

Whether to force selection of the highest bitrate audio and video tracks that comply with all other constraints.

Boolean

Whether to force selection of the single lowest bitrate audio and video tracks that comply with all other constraints.

Int

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

Boolean

Whether an image track will be selected over a video track if both are available.

Int

Maximum allowed audio bitrate in bits per second.

Int

Maximum allowed audio channel count.

Int

Maximum allowed video bitrate in bits per second.

Int

Maximum allowed video frame rate in hertz.

Int

Maximum allowed video height in pixels.

Int

Maximum allowed video width in pixels.

Int

Minimum allowed video bitrate in bits per second.

Int

Minimum allowed video frame rate in hertz.

Int

Minimum allowed video height in pixels.

Int

Minimum allowed video width in pixels.

ImmutableMap<TrackGroup!, TrackSelectionOverride!>!

Overrides to force selection of specific tracks.

ImmutableList<String!>!

The preferred languages for audio and forced text tracks as IETF BCP 47 conformant tags in order of preference.

ImmutableList<String!>!

The preferred sample MIME types for audio tracks in order of preference, or an empty list for no preference.

Int

The preferred C.RoleFlags for audio tracks.

ImmutableList<String!>!

The preferred languages for text tracks as IETF BCP 47 conformant tags in order of preference.

Int

The preferred C.RoleFlags for text tracks.

ImmutableList<String!>!

The preferred sample MIME types for video tracks in order of preference, or an empty list for no preference.

Int

The preferred C.RoleFlags for video tracks.

Boolean

Whether a text track with undetermined language should be selected if no track with preferredTextLanguages is available, or if preferredTextLanguages is unset.

Int

Viewport height in pixels.

Boolean

Whether the viewport orientation may change during playback.

Int

Viewport width in pixels.

Constants

DEFAULT

const val DEFAULTDefaultTrackSelector.Parameters!

DEFAULT_WITHOUT_CONTEXT

const val DEFAULT_WITHOUT_CONTEXTDefaultTrackSelector.Parameters!

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

If possible, use getDefaults instead.

This instance will not have the following settings:

Public functions

buildUpon

fun buildUpon(): DefaultTrackSelector.Parameters.Builder!

Creates a new Parameters.Builder, copying the initial values from this instance.

equals

fun equals(obj: Any?): Boolean

fromBundle

java-static fun fromBundle(bundle: Bundle!): DefaultTrackSelector.Parameters!

Restores a Parameters from a Bundle.

getDefaults

java-static fun getDefaults(context: Context!): DefaultTrackSelector.Parameters!

Returns an instance configured with default values.

getRendererDisabled

fun getRendererDisabled(rendererIndex: Int): Boolean

Returns whether the renderer is disabled.

Parameters
rendererIndex: Int

The renderer index.

Returns
Boolean

Whether the renderer is disabled.

getSelectionOverride

fun getSelectionOverride(rendererIndex: Int, groups: TrackGroupArray!): DefaultTrackSelector.SelectionOverride?

Returns the override for the specified renderer and TrackGroupArray.

Parameters
rendererIndex: Int

The renderer index.

groups: TrackGroupArray!

The TrackGroupArray.

Returns
DefaultTrackSelector.SelectionOverride?

The override, or null if no override exists.

hasSelectionOverride

fun hasSelectionOverride(rendererIndex: Int, groups: TrackGroupArray!): Boolean

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

Parameters
rendererIndex: Int

The renderer index.

groups: TrackGroupArray!

The TrackGroupArray.

Returns
Boolean

Whether there is an override.

hashCode

fun hashCode(): Int

toBundle

fun toBundle(): Bundle!

Public properties

allowAudioMixedChannelCountAdaptiveness

val allowAudioMixedChannelCountAdaptivenessBoolean

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.

allowAudioMixedDecoderSupportAdaptiveness

val allowAudioMixedDecoderSupportAdaptivenessBoolean

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

allowAudioMixedMimeTypeAdaptiveness

val allowAudioMixedMimeTypeAdaptivenessBoolean

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

allowAudioMixedSampleRateAdaptiveness

val allowAudioMixedSampleRateAdaptivenessBoolean

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.

allowAudioNonSeamlessAdaptiveness

val allowAudioNonSeamlessAdaptivenessBoolean

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

allowInvalidateSelectionsOnRendererCapabilitiesChange

val allowInvalidateSelectionsOnRendererCapabilitiesChangeBoolean

Whether to allow to invalidate selections on renderer capabilities change. The default value is false.

allowMultipleAdaptiveSelections

val allowMultipleAdaptiveSelectionsBoolean

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.

allowVideoMixedDecoderSupportAdaptiveness

val allowVideoMixedDecoderSupportAdaptivenessBoolean

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

allowVideoMixedMimeTypeAdaptiveness

val allowVideoMixedMimeTypeAdaptivenessBoolean

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

allowVideoNonSeamlessAdaptiveness

val allowVideoNonSeamlessAdaptivenessBoolean

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

constrainAudioChannelCountToDeviceCapabilities

val constrainAudioChannelCountToDeviceCapabilitiesBoolean

Whether to constrain audio track selection so that the selected track's channel count does not exceed the device's output capabilities. The default value is true.

exceedAudioConstraintsIfNecessary

val exceedAudioConstraintsIfNecessaryBoolean

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

exceedRendererCapabilitiesIfNecessary

val exceedRendererCapabilitiesIfNecessaryBoolean

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.

exceedVideoConstraintsIfNecessary

val exceedVideoConstraintsIfNecessaryBoolean

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

tunnelingEnabled

val tunnelingEnabledBoolean

Whether to enable tunneling if possible.