@Immutable public class MediaStatus extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MediaStatus.IdleReason
The reason for the player to be in
MediaStatus.PlayerState.IDLE state. |
static class |
MediaStatus.PlayerState
Represents the player state.
|
static class |
MediaStatus.RepeatMode
The behavior of the queue when all items have been played.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<Integer> |
activeTrackIds
The
List of IDs corresponding to the active tracks |
protected Integer |
currentItemId
The ID of the media item that originated the status change
|
protected double |
currentTime
The current playback position
|
protected Map<String,Object> |
customData
Application-specific media status data
|
protected ExtendedMediaStatus |
extendedStatus
Extended media status information
|
protected MediaStatus.IdleReason |
idleReason
If the state is
MediaStatus.PlayerState.IDLE, the reason the player went to
IDLE state. |
protected List<QueueItem> |
items
The
List of media queue items |
protected LiveSeekableRange |
liveSeekableRange
The seekable range of a live or event stream.
|
protected Integer |
loadingItemId
The ID of the media Item currently loading.
|
protected Media |
media
The media information
|
protected int |
mediaSessionId
Unique id for the session
|
protected float |
playbackRate
The playback rate
|
protected MediaStatus.PlayerState |
playerState
The playback state
|
protected Integer |
preloadedItemId
ID of the next Item, only available if it has been preloaded.
|
protected QueueData |
queueData
The queue data
|
protected MediaStatus.RepeatMode |
repeatMode
The behavior of the queue when all items have been played
|
protected int |
supportedMediaCommands
The commands supported by this player
|
protected VideoInformation |
videoInfo
The video information
|
protected MediaVolume |
volume
The current stream volume
|
| Constructor and Description |
|---|
MediaStatus(List<Integer> activeTrackIds,
Integer currentItemId,
double currentTime,
Map<String,Object> customData,
ExtendedMediaStatus extendedStatus,
MediaStatus.IdleReason idleReason,
List<QueueItem> items,
LiveSeekableRange liveSeekableRange,
Integer loadingItemId,
Media media,
int mediaSessionId,
float playbackRate,
MediaStatus.PlayerState playerState,
Integer preloadedItemId,
QueueData queueData,
MediaStatus.RepeatMode repeatMode,
int supportedMediaCommands,
VideoInformation videoInfo,
MediaVolume volume)
Creates a new instance using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<Integer> |
getActiveTrackIds() |
Integer |
getCurrentItemId() |
double |
getCurrentTime() |
Map<String,Object> |
getCustomData() |
ExtendedMediaStatus |
getExtendedStatus() |
MediaStatus.IdleReason |
getIdleReason() |
List<QueueItem> |
getItems() |
LiveSeekableRange |
getLiveSeekableRange() |
Integer |
getLoadingItemId() |
Media |
getMedia() |
int |
getMediaSessionId() |
float |
getPlaybackRate() |
MediaStatus.PlayerState |
getPlayerState() |
Integer |
getPreloadedItemId() |
QueueData |
getQueueData() |
MediaStatus.RepeatMode |
getRepeatMode() |
int |
getSupportedMediaCommands() |
VideoInformation |
getVideoInfo() |
MediaVolume |
getVolume() |
int |
hashCode() |
String |
toString() |
@Nonnull protected final List<Integer> activeTrackIds
List of IDs corresponding to the active tracks@Nullable protected final Integer currentItemId
protected final double currentTime
@Nonnull protected final Map<String,Object> customData
@Nullable protected final ExtendedMediaStatus extendedStatus
@Nullable protected final MediaStatus.IdleReason idleReason
MediaStatus.PlayerState.IDLE, the reason the player went to
IDLE state.@Nullable protected final LiveSeekableRange liveSeekableRange
@Nullable protected final Integer loadingItemId
null.protected final int mediaSessionId
protected final float playbackRate
@Nonnull protected final MediaStatus.PlayerState playerState
@Nullable protected final Integer preloadedItemId
@Nullable protected final MediaStatus.RepeatMode repeatMode
protected final int supportedMediaCommands
@Nullable protected final VideoInformation videoInfo
@Nonnull protected final MediaVolume volume
public MediaStatus(@Nullable List<Integer> activeTrackIds, @Nullable Integer currentItemId, double currentTime, @Nullable Map<String,Object> customData, @Nullable ExtendedMediaStatus extendedStatus, @Nullable MediaStatus.IdleReason idleReason, @Nullable List<QueueItem> items, @Nullable LiveSeekableRange liveSeekableRange, @Nullable Integer loadingItemId, @Nullable Media media, int mediaSessionId, float playbackRate, @Nonnull MediaStatus.PlayerState playerState, @Nullable Integer preloadedItemId, @Nullable QueueData queueData, @Nullable MediaStatus.RepeatMode repeatMode, int supportedMediaCommands, @Nullable VideoInformation videoInfo, @Nonnull MediaVolume volume)
activeTrackIds - the List of IDs corresponding to the active
tracks.currentItemId - the ID of the media item that originated the status
change.currentTime - the current playback position.customData - the application-specific media status data.extendedStatus - the extended media status information.idleReason - the reason the player went to MediaStatus.PlayerState.IDLE
if the current state is MediaStatus.PlayerState.IDLE, otherwise
null.items - the List of media QueueItems.liveSeekableRange - the seekable range of a live or event stream. It
uses relative media time in seconds. It will be undefined for
VOD streams.loadingItemId - the ID of the media item currently loading. If there
is no item being loaded, it will be null.media - the media information.mediaSessionId - the unique id for the session.playbackRate - the playback rate.playerState - the playback state.preloadedItemId - the ID of the next Item, only available if it has
been preloaded. Media items can be preloaded and cached
temporarily in memory, so when they are loaded later on, the
process is faster (as the media does not have to be fetched
from the network).queueData - the queue data.repeatMode - the behavior of the queue when all items have been
played.supportedMediaCommands - the commands supported by this player.videoInfo - the video information.volume - the current stream volume.IllegalArgumentException - If playerState or volume
is null.@Nonnull public List<Integer> getActiveTrackIds()
List of IDs corresponding to the active tracks.@Nullable public Integer getCurrentItemId()
public double getCurrentTime()
@Nonnull public Map<String,Object> getCustomData()
@Nullable public ExtendedMediaStatus getExtendedStatus()
@Nullable public MediaStatus.IdleReason getIdleReason()
MediaStatus.PlayerState.IDLE if the
current state is MediaStatus.PlayerState.IDLE, otherwise
null.@Nullable public LiveSeekableRange getLiveSeekableRange()
@Nullable public Integer getLoadingItemId()
null.public int getMediaSessionId()
public float getPlaybackRate()
@Nonnull public MediaStatus.PlayerState getPlayerState()
@Nullable public Integer getPreloadedItemId()
@Nullable public MediaStatus.RepeatMode getRepeatMode()
public int getSupportedMediaCommands()
@Nullable public VideoInformation getVideoInfo()
@Nonnull public MediaVolume getVolume()
Copyright © 2022. All rights reserved.