Class TrackSelectionView

    • Constructor Detail

      • TrackSelectionView

        public TrackSelectionView​(Context context)
        Deprecated.
        Creates a track selection view.
      • TrackSelectionView

        public TrackSelectionView​(Context context,
                                  @Nullable
                                  AttributeSet attrs)
        Deprecated.
        Creates a track selection view.
      • TrackSelectionView

        public TrackSelectionView​(Context context,
                                  @Nullable
                                  AttributeSet attrs,
                                  @AttrRes
                                  int defStyleAttr)
        Deprecated.
        Creates a track selection view.
    • Method Detail

      • filterOverrides

        public static Map<TrackGroup,​TrackSelectionOverride> filterOverrides​(Map<TrackGroup,​TrackSelectionOverride> overrides,
                                                                                   List<Tracks.Group> trackGroups,
                                                                                   boolean allowMultipleOverrides)
        Deprecated.
        Returns the subset of overrides that apply to the specified trackGroups. If allowMultipleOverrides is then at most one override is retained, which will be the one whose track group is first in trackGroups.
        Parameters:
        overrides - The overrides to filter.
        trackGroups - The track groups whose overrides should be retained.
        allowMultipleOverrides - Whether more than one override can be retained.
        Returns:
        The filtered overrides.
      • setAllowAdaptiveSelections

        public void setAllowAdaptiveSelections​(boolean allowAdaptiveSelections)
        Deprecated.
        Sets whether adaptive selections (consisting of more than one track) can be made using this selection view.

        For the view to enable adaptive selection it is necessary both for this feature to be enabled, and for the target renderer to support adaptation between the available tracks.

        Parameters:
        allowAdaptiveSelections - Whether adaptive selection is enabled.
      • setAllowMultipleOverrides

        public void setAllowMultipleOverrides​(boolean allowMultipleOverrides)
        Deprecated.
        Sets whether tracks from multiple track groups can be selected. This results in multiple TrackSelectionOverrides being returned by getOverrides().
        Parameters:
        allowMultipleOverrides - Whether tracks from multiple track groups can be selected.
      • setShowDisableOption

        public void setShowDisableOption​(boolean showDisableOption)
        Deprecated.
        Sets whether the disabled option can be selected.
        Parameters:
        showDisableOption - Whether the disabled option can be selected.
      • setTrackNameProvider

        public void setTrackNameProvider​(TrackNameProvider trackNameProvider)
        Deprecated.
        Sets the TrackNameProvider used to generate the user visible name of each track and updates the view with track names queried from the specified provider.
        Parameters:
        trackNameProvider - The TrackNameProvider to use.
      • init

        public void init​(List<Tracks.Group> trackGroups,
                         boolean isDisabled,
                         Map<TrackGroup,​TrackSelectionOverride> overrides,
                         @Nullable
                         Comparator<Format> trackFormatComparator,
                         @Nullable
                         TrackSelectionView.TrackSelectionListener listener)
        Deprecated.
        Initialize the view to select tracks from a specified list of track groups.
        Parameters:
        trackGroups - The track groups.
        isDisabled - Whether the disabled option should be initially selected.
        overrides - The initially selected track overrides. Any overrides that do not correspond to track groups in trackGroups will be ignored. If setAllowMultipleOverrides(boolean) hasn't been set to true then all but one override will be ignored. The retained override will be the one whose track group is first in trackGroups.
        trackFormatComparator - An optional comparator used to determine the display order of the tracks within each track group.
        listener - An optional listener to receive selection updates.
      • getIsDisabled

        public boolean getIsDisabled()
        Deprecated.
        Returns whether the disabled option is selected.