MediaQueueData

  • MediaQueueData holds information about the playing queue or media container.

  • It includes nested classes for building MediaQueueData objects and defining media queue types.

  • Various constant values define different types of media queues, such as albums, movies, and playlists.

  • Public methods allow access to properties like container metadata, queue items, name, ID, type, repeat mode, start index, and start time.

  • The class also implements the Parcelable interface for serialization.

public classMediaQueueData extendsObject
implementsParcelable

A class that holds the information of the playing queue or media container.

Nested Class Summary

classMediaQueueData.BuilderBuilder class for constructing aMediaQueueData
@interface MediaQueueData.MediaQueueTypeThe type of the media queue. 

Constant Summary

int MEDIA_QUEUE_TYPE_ALBUMA media type representing an album.
int MEDIA_QUEUE_TYPE_AUDIO_BOOKA media type representing an audio book.
int MEDIA_QUEUE_TYPE_GENERICGeneric or unspecified media type.
int MEDIA_QUEUE_TYPE_LIVE_TVA media type representing live TV.
int MEDIA_QUEUE_TYPE_MOVIEA media type representing a movie.
int MEDIA_QUEUE_TYPE_PLAYLISTA media type representing an audio playlist.
int MEDIA_QUEUE_TYPE_PODCAST_SERIESA media type representing a podcast series.
int MEDIA_QUEUE_TYPE_RADIO_STATIONA media type representing a radio station.
int MEDIA_QUEUE_TYPE_TV_SERIESA media type representing a TV series.
int MEDIA_QUEUE_TYPE_VIDEO_PLAYLISTA media type representing a video playlist.

Inherited Constant Summary

From interface android.os.Parcelable
intCONTENTS_FILE_DESCRIPTOR
intPARCELABLE_WRITE_RETURN_VALUE

Public Method Summary

boolean
MediaQueueContainerMetadata
getContainerMetadata()
Returns the additional description for the queue.
String
getEntity()
Returns the queue deep link.
List<MediaQueueItem>
getItems()
Returns the list of queue items.
String
getName()
Returns the display name for the queue.
String
getQueueId()
Returns the queue ID.
int
getQueueType()
Returns the type of the queue.
int
getRepeatMode()
Returns the repeat mode of the queue.
int
getStartIndex()
Returns the index of the item that should play first.
long
getStartTime()
Returns the playback start time, in milliseconds.
int
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

From class java.lang.Object
Object
clone()
boolean
equals(Object arg0)
void
finalize()
finalClass<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
From interface android.os.Parcelable
abstract int
describeContents()
abstract void
writeToParcel(Parcel arg0, int arg1)

Constants

public static final intMEDIA_QUEUE_TYPE_ALBUM

A media type representing an album.

Constant Value:1

public static final intMEDIA_QUEUE_TYPE_AUDIO_BOOK

A media type representing an audio book.

Constant Value:3

public static final intMEDIA_QUEUE_TYPE_GENERIC

Generic or unspecified media type.

Constant Value:0

public static final intMEDIA_QUEUE_TYPE_LIVE_TV

A media type representing live TV.

Constant Value:8

public static final intMEDIA_QUEUE_TYPE_MOVIE

A media type representing a movie.

Constant Value:9

public static final intMEDIA_QUEUE_TYPE_PLAYLIST

A media type representing an audio playlist.

Constant Value:2

public static final intMEDIA_QUEUE_TYPE_PODCAST_SERIES

A media type representing a podcast series.

Constant Value:5

public static final intMEDIA_QUEUE_TYPE_RADIO_STATION

A media type representing a radio station.

Constant Value:4

public static final intMEDIA_QUEUE_TYPE_TV_SERIES

A media type representing a TV series.

Constant Value:6

public static final intMEDIA_QUEUE_TYPE_VIDEO_PLAYLIST

A media type representing a video playlist.

Constant Value:7

Public Methods

public booleanequals(Object other)

publicMediaQueueContainerMetadatagetContainerMetadata()

Returns the additional description for the queue.

publicStringgetEntity()

Returns the queue deep link.

publicList<MediaQueueItem>getItems()

Returns the list of queue items. The item list should only be valid when sending theMediaQueueData in load requests. In all other cases, it should benull.

publicStringgetName()

Returns the display name for the queue.

publicStringgetQueueId()

Returns the queue ID.

public intgetQueueType()

Returns the type of the queue.

public intgetStartIndex()

Returns the index of the item that should play first. This is only valid for load requests.

public longgetStartTime()

Returns the playback start time, in milliseconds.

If unspecified, the default value is MediaLoadRequestData.PLAY_POSITION_UNASSIGNED.

public inthashCode()

public voidwriteToParcel(Parcel out, int flags)

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.