CastTrackSelector.CastTrackSelectorRequest


public final class CastTrackSelector.CastTrackSelectorRequest


Holds parameters associated with a evaluation request.

Summary

Public fields

final ImmutableSet<TrackGroup>

The currently selected track groups, as reported by Cast remote media client.

final int

The id of the active Cast media item when the evaluation is made.

final ImmutableList<MediaTrack>

The Cast media tracks, where positions match the corresponding trackGroupList.

final ImmutableList<TrackGroup>

The list of available track groups, where positions match the track group's corresponding Cast media tracks.

final TrackSelectionParameters

The currently active track selection parameters.

final int

The reason for this track selection evaluation request.

Public constructors

CastTrackSelectorRequest(
    int mediaItemId,
    TrackSelectionParameters trackSelectionParameters,
    ImmutableList<TrackGroup> trackGroupList,
    ImmutableList<MediaTrack> mediaTracks,
    ImmutableSet<TrackGroup> currentlySelectedTrackGroups,
    @CastTrackSelector.TrackSelectionRequestReason int trackSelectionRequestReason
)

Creates a new instance.

Public methods

CastTrackSelector.CastTrackSelectorResult.Builder

Returns a CastTrackSelectorResult.Builder that's already initialized with the values from this CastTrackSelectorRequest, so that clients can easily limit changes to fields they want to modify.

boolean
int

Public fields

currentlySelectedTrackGroups

public final ImmutableSet<TrackGroupcurrentlySelectedTrackGroups

The currently selected track groups, as reported by Cast remote media client.

mediaItemId

public final int mediaItemId

The id of the active Cast media item when the evaluation is made.

mediaTracks

public final ImmutableList<MediaTrackmediaTracks

The Cast media tracks, where positions match the corresponding trackGroupList.

trackGroupList

public final ImmutableList<TrackGrouptrackGroupList

The list of available track groups, where positions match the track group's corresponding Cast media tracks.

trackSelectionParameters

public final TrackSelectionParameters trackSelectionParameters

The currently active track selection parameters.

trackSelectionRequestReason

@CastTrackSelector.TrackSelectionRequestReason
public final int trackSelectionRequestReason

The reason for this track selection evaluation request.

Can be used to determine whether to change the selections (for example, in response to new TrackSelectionParameters), or the trackSelectionParameters (for example, in response to a receiver-side track selection change).

Public constructors

CastTrackSelectorRequest

public CastTrackSelectorRequest(
    int mediaItemId,
    TrackSelectionParameters trackSelectionParameters,
    ImmutableList<TrackGroup> trackGroupList,
    ImmutableList<MediaTrack> mediaTracks,
    ImmutableSet<TrackGroup> currentlySelectedTrackGroups,
    @CastTrackSelector.TrackSelectionRequestReason int trackSelectionRequestReason
)

Creates a new instance.

Parameters
int mediaItemId

See mediaItemId.

TrackSelectionParameters trackSelectionParameters

See trackSelectionParameters.

ImmutableList<TrackGroup> trackGroupList

See trackGroupList.

ImmutableList<MediaTrack> mediaTracks

See mediaTracks.

ImmutableSet<TrackGroup> currentlySelectedTrackGroups

See currentlySelectedTrackGroups.

@CastTrackSelector.TrackSelectionRequestReason int trackSelectionRequestReason

See trackSelectionRequestReason.

Public methods

buildResultUpon

public CastTrackSelector.CastTrackSelectorResult.Builder buildResultUpon()

Returns a CastTrackSelectorResult.Builder that's already initialized with the values from this CastTrackSelectorRequest, so that clients can easily limit changes to fields they want to modify.

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()