MediaSession.MediaItemsWithStartPosition


@UnstableApi
public final class MediaSession.MediaItemsWithStartPosition


Representation of a list of media items and where to start playing.

Summary

Public fields

final ImmutableList<MediaItem>

List of media items.

final int

Index to start playing at in mediaItems.

final long

Position in milliseconds to start playing from in the starting media item.

Public constructors

MediaItemsWithStartPosition(
    List<MediaItem> mediaItems,
    int startIndex,
    long startPositionMs
)

Creates an instance.

Public methods

boolean
int

Public fields

mediaItems

public final ImmutableList<MediaItemmediaItems

List of media items.

startIndex

public final int startIndex

Index to start playing at in mediaItems.

The start index in mediaItems from which to start playing, or INDEX_UNSET to start playing from the default index in the playlist.

startPositionMs

public final long startPositionMs

Position in milliseconds to start playing from in the starting media item.

The starting position in the media item from where to start playing, or TIME_UNSET to start playing from the default position in the media item. This value is ignored if startIndex is INDEX_UNSET.

Public constructors

MediaItemsWithStartPosition

public MediaItemsWithStartPosition(
    List<MediaItem> mediaItems,
    int startIndex,
    long startPositionMs
)

Creates an instance.

Parameters
List<MediaItem> mediaItems

List of media items.

int startIndex

Index to start playing at in mediaItems, or INDEX_UNSET to start from the default index.

long startPositionMs

Position in milliseconds to start playing from in the starting media item, or TIME_UNSET to start from the default position.

Public methods

equals

public boolean equals(@Nullable Object obj)

hashCode

public int hashCode()