Google is committed to advancing racial equity for Black communities. See how.

MediaStatusWriter

public class MediaStatusWriter extends Object

The writer class to make modifications on a MediaStatus instance.

Public Method Summary

MediaInfoWriter
getMediaInfoWriter()
Returns a MediaInfoWriter to modify the MediaInfo in this MediaStatus.
MediaStatus
getMediaStatus()
Returns the wrapped MediaStatus object.
MediaStatusWriter
setActiveTrackIds(long[] activeTrackIds)
Sets the list of active track IDs.
MediaStatusWriter
MediaStatusWriter
setCurrentItemId(int currentItemId)
Sets the item ID of the item that that was active in the queue (it may not be playing) at the time the media status change happened.
MediaStatusWriter
setCustomData(JSONObject customData)
Sets any custom data that is associated with the media item.
MediaStatusWriter
setIdleReason(int idleReason)
Sets the player state idle reason.
MediaStatusWriter
setIsPlayingAd(boolean isPlayingAd)
Sets whether an ad is playing on the receiver.
MediaStatusWriter
setLiveSeekableRange(MediaLiveSeekableRange liveSeekableRange)
Sets the seekable range of a live stream.
MediaStatusWriter
setLoadingItemId(int loadingItemId)
Sets the item ID of the item that is currently loading (but isn't active in the queue).
MediaStatusWriter
setMediaInfo(MediaInfo mediaInfo)
Sets the MediaInfo for this item.
MediaStatusWriter
setMuteState(boolean muteState)
Sets the stream's mute state.
MediaStatusWriter
setPlaybackRate(double playbackRate)
Sets the current stream playback rate.
MediaStatusWriter
setPlayerState(int playerState)
Sets the current media player state.
MediaStatusWriter
setPreloadedItemId(int preloadedItemId)
Sets the next item has been preloaded this returns the preloaded item ID.
MediaStatusWriter
MediaStatusWriter
setQueueItems(List<MediaQueueItem> queueItems)
Sets the list of MediaQueueItem.
MediaStatusWriter
setQueueRepeatMode(int queueRepeatMode)
Sets the repeat mode of the media queue.
MediaStatusWriter
setStreamPosition(long streamPosition)
Sets the current stream position, in milliseconds.
MediaStatusWriter
setStreamVolume(double streamVolume)
Sets the stream's volume.
MediaStatusWriter
setSupportedMediaCommands(long supportedMediaCommands)
Sets the supported media commands.
MediaStatusWriter
setVideoInfo(VideoInfo videoInfo)
Sets the VideoInfo.

Inherited Method Summary

Public Methods

public MediaInfoWriter getMediaInfoWriter ()

Returns a MediaInfoWriter to modify the MediaInfo in this MediaStatus.

If the MediaStatus doesn't have MediaInfo, then this method returns null, and you should call setMediaInfo(MediaInfo) to set the MediaInfo directly.

public MediaStatus getMediaStatus ()

Returns the wrapped MediaStatus object.

public MediaStatusWriter setActiveTrackIds (long[] activeTrackIds)

Sets the list of active track IDs. It can be null.

public MediaStatusWriter setAdBreakStatus (AdBreakStatus adBreakStatus)

Sets the AdBreakStatus.

public MediaStatusWriter setCurrentItemId (int currentItemId)

Sets the item ID of the item that that was active in the queue (it may not be playing) at the time the media status change happened.

public MediaStatusWriter setCustomData (JSONObject customData)

Sets any custom data that is associated with the media item.

public MediaStatusWriter setIdleReason (int idleReason)

Sets the player state idle reason. This value is only meaningful if the player state is in fact PLAYER_STATE_IDLE.

public MediaStatusWriter setIsPlayingAd (boolean isPlayingAd)

Sets whether an ad is playing on the receiver.

public MediaStatusWriter setLiveSeekableRange (MediaLiveSeekableRange liveSeekableRange)

Sets the seekable range of a live stream.

public MediaStatusWriter setLoadingItemId (int loadingItemId)

Sets the item ID of the item that is currently loading (but isn't active in the queue).

public MediaStatusWriter setMediaInfo (MediaInfo mediaInfo)

Sets the MediaInfo for this item.

public MediaStatusWriter setMuteState (boolean muteState)

Sets the stream's mute state.

public MediaStatusWriter setPlaybackRate (double playbackRate)

Sets the current stream playback rate.

public MediaStatusWriter setPlayerState (int playerState)

Sets the current media player state.

public MediaStatusWriter setPreloadedItemId (int preloadedItemId)

Sets the next item has been preloaded this returns the preloaded item ID.

public MediaStatusWriter setQueueData (MediaQueueData queueData)

Sets the MediaQueueData.

public MediaStatusWriter setQueueItems (List<MediaQueueItem> queueItems)

Sets the list of MediaQueueItem.

public MediaStatusWriter setQueueRepeatMode (int queueRepeatMode)

Sets the repeat mode of the media queue.

public MediaStatusWriter setStreamPosition (long streamPosition)

Sets the current stream position, in milliseconds.

public MediaStatusWriter setStreamVolume (double streamVolume)

Sets the stream's volume.

public MediaStatusWriter setSupportedMediaCommands (long supportedMediaCommands)

Sets the supported media commands.

public MediaStatusWriter setVideoInfo (VideoInfo videoInfo)

Sets the VideoInfo.