@Immutable public class QueueItem extends Object
Application developers may need to create a QueueItem to insert a
queue element. In this case they should not provide an itemId (as the
actual itemId will be assigned when the item is inserted in the queue). This
prevents ID collisions with items added from a sender application.
| Modifier and Type | Field and Description |
|---|---|
protected List<Integer> |
activeTrackIds
|
protected Boolean |
autoplay
If the autoplay parameter is not specified or is
true, the media
player will begin playing the element in the queue when the item becomes
the currentItem. |
protected Map<String,Object> |
customData
The application can define any extra queue item information needed
|
protected Integer |
itemId
Unique identifier of the item in the queue.
|
protected Media |
media
Metadata (including contentId) of the playlist element
|
protected Integer |
orderId
Used to track original order of an item in the queue to undo shuffle
|
protected Double |
preloadTime
This parameter is a hint for the receiver to preload this media item
before it is played.
|
protected Double |
startTime
Seconds since beginning of content.
|
| Constructor and Description |
|---|
QueueItem(List<Integer> activeTrackIds,
Boolean autoplay,
Map<String,Object> customData,
Integer itemId,
Media media,
Integer orderId,
Double preloadTime,
Double startTime)
Creates a new instance using the specified parameters.
|
QueueItem(List<Integer> activeTrackIds,
Boolean autoplay,
Media media,
Double preloadTime,
Double startTime)
Creates a new instance using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<Integer> |
getActiveTrackIds() |
Boolean |
getAutoplay()
If the autoplay parameter is not specified or is
true, the media
player will begin playing the element in the queue when the item becomes
the currentItem. |
Map<String,Object> |
getCustomData()
The application can define any extra queue item information needed.
|
Integer |
getItemId()
The item ID is a unique identifier of the item in the queue.
|
Media |
getMedia() |
Integer |
getOrderId() |
Double |
getPreloadTime()
This parameter is a hint for the receiver to preload this media item
before it is played.
|
Double |
getStartTime() |
int |
hashCode() |
String |
toString() |
@Nullable protected final Boolean autoplay
true, the media
player will begin playing the element in the queue when the item becomes
the currentItem.@Nonnull protected final Map<String,Object> customData
@Nullable protected final Integer itemId
@Nullable protected final Integer orderId
@Nullable protected final Double preloadTime
public QueueItem(@Nullable List<Integer> activeTrackIds, @Nullable Boolean autoplay, @Nullable Media media, @Nullable Double preloadTime, @Nullable Double startTime)
activeTrackIds - the List of Track trackIds
that are active. If the list is not provided, the default
tracks will be active.autoplay - the autoplay parameter, which if is not specified or is
true, the media player will begin playing the element
in the queue when the item becomes the currentItem.media - the Media instance of the playlist element.preloadTime - the preload time in seconds.startTime - the number of seconds since beginning of the content. If
the content is live content, and startTime is not
specified, the stream will start at the live position.public QueueItem(@Nullable List<Integer> activeTrackIds, @Nullable Boolean autoplay, @Nullable Map<String,Object> customData, @Nullable Integer itemId, @Nullable Media media, @Nullable Integer orderId, @Nullable Double preloadTime, @Nullable Double startTime)
activeTrackIds - the List of Track trackIds
that are active. If the list is not provided, the default
tracks will be active.autoplay - the autoplay parameter, which if is not specified or is
true, the media player will begin playing the element
in the queue when the item becomes the currentItem.customData - the extra queue item information.itemId - the item ID, which is a unique identifier of the item in
the queue. The attribute is optional because for LOAD or
INSERT should not be provided (as it will be assigned by the
receiver when an item is first created/inserted).media - the Media instance of the playlist element.orderId - the order ID, which is used to track the original order of
an item in the queue to undo shuffle.preloadTime - the preload time in seconds.startTime - the number of seconds since beginning of the content. If
the content is live content, and startTime is not
specified, the stream will start at the live position.@Nullable public Boolean getAutoplay()
true, the media
player will begin playing the element in the queue when the item becomes
the currentItem.@Nonnull public Map<String,Object> getCustomData()
@Nullable public Integer getItemId()
@Nullable public Integer getOrderId()
@Nullable public Double getPreloadTime()
@Nullable public Double getStartTime()
startTime is not specified,
the stream will start at the live position.Copyright © 2022. All rights reserved.