AI-generated Key Takeaways
-
MediaTracksModifieris a class for managing media tracks of the top-levelMediaInfo. -
The class provides access to the tracks from
MediaInfoModifier.getMediaTracks()ofMediaStatusModifier.getMediaInfoModifier(). -
It includes APIs to get and set active tracks, with the active track IDs being populated to
MediaStatus. -
Key methods include clearing active track IDs, getting all active track IDs, getting active tracks by type, getting all media tracks, getting media tracks by type, and setting active track IDs.
Modifier class for managing media tracks.
The class provides access to the tracks of the top-level MediaInfo, as
specified in the
MediaInfoModifier.getMediaTracks() of
MediaStatusModifier.getMediaInfoModifier().
The class also provides APIs to get and set the active tracks (including APIs that are
scoped to track types). The active track IDs will be populated to MediaStatus.
Public Method Summary
| void |
clear()
Clears the active track IDs.
|
| Set<Long> |
getActiveTrackIds()
Returns the set of IDs of all tracks.
|
| List<MediaTrack> |
getActiveTracksByType(int type)
Returns the list of active media tracks of
type.
|
| List<MediaTrack> |
getMediaTracks()
Returns the list of media tracks of the top-level
MediaInfoModifier.
|
| List<MediaTrack> |
getMediaTracksByType(int type)
Returns the list of media tracks of
type of the top-level
MediaInfoModifier.
|
| MediaTracksModifier |
setActiveTrackIds(long[] activeTrackIds)
Sets the list of active track IDs.
|
| void | |
| void |
setActiveTracksByType(int type, List<MediaTrack>
newActiveTracks)
Sets the active tracks for of
type.
|
Inherited Method Summary
Public Methods
public void clear ()
Clears the active track IDs.
public List<MediaTrack> getActiveTracksByType (int type)
Returns the list of active media tracks of type.
Parameters
| type | the track type, which is one of the types in
com.google.android.gms.cast.MediaTrack.TYPE_* |
|---|
public List<MediaTrack> getMediaTracks ()
Returns the list of media tracks of the top-level MediaInfoModifier.
public List<MediaTrack> getMediaTracksByType (int type)
Returns the list of media tracks of type of the top-level
MediaInfoModifier.
Parameters
| type | the track type, which is one of the types in
com.google.android.gms.cast.MediaTrack.TYPE_* |
|---|
public MediaTracksModifier setActiveTrackIds (long[] activeTrackIds)
Sets the list of active track IDs.
public void setActiveTracksByType (int type, Set<Long> newTrackIds)
Sets the active track IDs of type.
This method is scoped to the given type. Any track IDs that are of the
same type and are not in newTrackIds will be unset.
Parameters
| type | the track type, which is one of the types in
com.google.android.gms.cast.MediaTrack.TYPE_* |
|---|---|
| newTrackIds |
public void setActiveTracksByType (int type, List<MediaTrack> newActiveTracks)
Sets the active tracks for of type.
This method is scoped to the given type. Any track IDs that are of the
same type and are not in newTrackIds will be unset.
Parameters
| type | the track type, which is one of the types in
com.google.android.gms.cast.MediaTrack.TYPE_* |
|---|---|
| newActiveTracks |