ForwardingPlayer


@UnstableApi
public class ForwardingPlayer implements Player


A Player that forwards method calls to another Player. Applications can use this class to suppress or modify specific operations, by overriding the respective methods.

Summary

Public constructors

Creates a new instance that forwards all operations to player.

Public methods

void

Calls addListener on the delegate.

void

Calls addMediaItem on the delegate.

void
addMediaItem(int index, MediaItem mediaItem)

Calls addMediaItem on the delegate.

void

Calls addMediaItems on the delegate.

void
addMediaItems(int index, List<MediaItem> mediaItems)

Calls addMediaItems on the delegate.

boolean

Calls canAdvertiseSession on the delegate and returns the result.

void

Calls clearMediaItems on the delegate.

void

Calls clearVideoSurface on the delegate.

void

Calls clearVideoSurface on the delegate.

void

Calls clearVideoSurfaceHolder on the delegate.

void

Calls clearVideoSurfaceView on the delegate.

void

Calls clearVideoTextureView on the delegate.

void

This method is deprecated.

Use decreaseDeviceVolume instead.

void

Calls decreaseDeviceVolume on the delegate.

Looper

Calls getApplicationLooper on the delegate and returns the result.

AudioAttributes

Calls getAudioAttributes on the delegate and returns the result.

Player.Commands

Calls getAvailableCommands on the delegate and returns the result.

int

Calls getBufferedPercentage on the delegate and returns the result.

long

Calls getBufferedPosition on the delegate and returns the result.

long

Calls getContentBufferedPosition on the delegate and returns the result.

long

Calls getContentDuration on the delegate and returns the result.

long

Calls getContentPosition on the delegate and returns the result.

int

Calls getCurrentAdGroupIndex on the delegate and returns the result.

int

Calls getCurrentAdIndexInAdGroup on the delegate and returns the result.

CueGroup

Calls getCurrentCues on the delegate and returns the result.

long

Calls getCurrentLiveOffset on the delegate and returns the result.

@Nullable Object

Calls getCurrentManifest on the delegate and returns the result.

@Nullable MediaItem

Calls getCurrentMediaItem on the delegate and returns the result.

int

Calls getCurrentMediaItemIndex on the delegate and returns the result.

int

Calls getCurrentPeriodIndex on the delegate and returns the result.

long

Calls getCurrentPosition on the delegate and returns the result.

Timeline

Calls getCurrentTimeline on the delegate and returns the result.

Tracks

Calls getCurrentTracks on the delegate and returns the result.

int

This method is deprecated.

Use getCurrentMediaItemIndex instead.

DeviceInfo

Calls getDeviceInfo on the delegate and returns the result.

int

Calls getDeviceVolume on the delegate and returns the result.

long

Calls getDuration on the delegate and returns the result.

long

Calls getMaxSeekToPreviousPosition on the delegate and returns the result.

MediaItem
getMediaItemAt(int index)

Calls getMediaItemAt on the delegate and returns the result.

int

Calls getMediaItemCount on the delegate and returns the result.

MediaMetadata

Calls getMediaMetadata on the delegate and returns the result.

int

Calls getNextMediaItemIndex on the delegate and returns the result.

int

This method is deprecated.

Use getNextMediaItemIndex instead.

boolean

Calls getPlayWhenReady on the delegate and returns the result.

PlaybackParameters

Calls getPlaybackParameters on the delegate and returns the result.

int

Calls getPlaybackState on the delegate and returns the result.

int

Calls getPlaybackSuppressionReason on the delegate and returns the result.

@Nullable PlaybackException

Calls getPlayerError on the delegate and returns the result.

MediaMetadata

Calls getPlaylistMetadata on the delegate and returns the result.

int

Calls getPreviousMediaItemIndex on the delegate and returns the result.

int

This method is deprecated.

Use getPreviousMediaItemIndex instead.

int

Calls getRepeatMode on the delegate and returns the result.

long

Calls getSeekBackIncrement on the delegate and returns the result.

long

Calls getSeekForwardIncrement on the delegate and returns the result.

boolean

Calls getShuffleModeEnabled on the delegate and returns the result.

Size

Calls getSurfaceSize on the delegate and returns the result.

long

Calls getTotalBufferedDuration on the delegate and returns the result.

TrackSelectionParameters

Calls getTrackSelectionParameters on the delegate and returns the result.

VideoSize

Calls getVideoSize on the delegate and returns the result.

float

Calls getVolume on the delegate and returns the result.

Player

Returns the Player to which operations are forwarded.

boolean

This method is deprecated.

Use hasNextMediaItem instead.

boolean

Calls hasNextMediaItem on the delegate and returns the result.

boolean

This method is deprecated.

Use hasNextMediaItem instead.

boolean

This method is deprecated.

Use hasPreviousMediaItem instead.

boolean

Calls hasPreviousMediaItem on the delegate and returns the result.

boolean

This method is deprecated.

Use hasPreviousMediaItem instead.

void

This method is deprecated.

Use increaseDeviceVolume instead.

void

Calls increaseDeviceVolume on the delegate.

boolean

Calls isCommandAvailable on the delegate and returns the result.

boolean

Calls isCurrentMediaItemDynamic on the delegate and returns the result.

boolean

Calls isCurrentMediaItemLive on the delegate and returns the result.

boolean

Calls isCurrentMediaItemSeekable on the delegate and returns the result.

boolean

This method is deprecated.

Use isCurrentMediaItemDynamic instead.

boolean

This method is deprecated.

Use isCurrentMediaItemLive instead.

boolean

This method is deprecated.

Use isCurrentMediaItemSeekable instead.

boolean

Calls isDeviceMuted on the delegate and returns the result.

boolean

Calls isLoading on the delegate and returns the result.

boolean

Calls isPlaying on the delegate and returns the result.

boolean

Calls isPlayingAd on the delegate and returns the result.

void
moveMediaItem(int currentIndex, int newIndex)

Calls moveMediaItem on the delegate.

void
moveMediaItems(int fromIndex, int toIndex, int newIndex)

Calls moveMediaItems on the delegate.

void

This method is deprecated.

Use seekToNextMediaItem instead.

void

Calls pause on the delegate.

void

Calls play on the delegate.

void

Calls prepare on the delegate.

void

This method is deprecated.

Use seekToPreviousMediaItem instead.

void

Calls release on the delegate.

void

Calls removeListener on the delegate.

void
removeMediaItem(int index)

Calls removeMediaItem on the delegate.

void
removeMediaItems(int fromIndex, int toIndex)

Calls removeMediaItems on the delegate.

void
replaceMediaItem(int index, MediaItem mediaItem)

Calls replaceMediaItem on the delegate.

void
replaceMediaItems(
    int fromIndex,
    int toIndex,
    List<MediaItem> mediaItems
)

Calls replaceMediaItems on the delegate.

void

Calls seekBack on the delegate.

void

Calls seekForward on the delegate.

void
seekTo(long positionMs)

Calls seekTo on the delegate.

void
seekTo(int mediaItemIndex, long positionMs)

Calls seekTo on the delegate.

void

Calls seekToDefaultPosition on the delegate.

void
seekToDefaultPosition(int mediaItemIndex)

Calls seekToDefaultPosition on the delegate.

void

Calls seekToNext on the delegate.

void

Calls seekToNextMediaItem on the delegate.

void

This method is deprecated.

Use seekToNextMediaItem instead.

void

Calls seekToPrevious on the delegate.

void

Calls seekToPreviousMediaItem on the delegate.

void

This method is deprecated.

Use seekToPreviousMediaItem instead.

void
setAudioAttributes(
    AudioAttributes audioAttributes,
    boolean handleAudioFocus
)

Calls setAudioAttributes on the delegate.

void
setDeviceMuted(boolean muted)

This method is deprecated.

Use setDeviceMuted instead.

void
setDeviceMuted(boolean muted, @C.VolumeFlags int flags)

Calls setDeviceMuted on the delegate.

void
setDeviceVolume(int volume)

This method is deprecated.

Use setDeviceVolume instead.

void
setDeviceVolume(int volume, @C.VolumeFlags int flags)

Calls setDeviceVolume on the delegate.

void

Calls setMediaItem on the delegate.

void
setMediaItem(MediaItem mediaItem, boolean resetPosition)

Calls setMediaItem on the delegate.

void
setMediaItem(MediaItem mediaItem, long startPositionMs)

Calls setMediaItem on the delegate.

void

Calls setMediaItems on the delegate.

void
setMediaItems(List<MediaItem> mediaItems, boolean resetPosition)

Calls setMediaItems ()} on the delegate.

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

Calls setMediaItems on the delegate.

void
setPlayWhenReady(boolean playWhenReady)

Calls setPlayWhenReady on the delegate.

void

Calls setPlaybackParameters on the delegate.

void
setPlaybackSpeed(float speed)

Calls setPlaybackSpeed on the delegate.

void

Calls setPlaylistMetadata on the delegate.

void

Calls setRepeatMode on the delegate.

void
setShuffleModeEnabled(boolean shuffleModeEnabled)

Calls setShuffleModeEnabled on the delegate.

void

Calls setTrackSelectionParameters on the delegate.

void

Calls setVideoSurface on the delegate.

void

Calls setVideoSurfaceHolder on the delegate.

void

Calls setVideoSurfaceView on the delegate.

void

Calls setVideoTextureView on the delegate.

void
setVolume(float volume)

Calls setVolume on the delegate.

void

Calls stop on the delegate.

Inherited Constants

From androidx.media3.common.Player
static final int

This field is deprecated.

Use COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS instead.

static final int

Command to increase and decrease the device volume and mute it with volume flags.

static final int

Command to change the media items in the playlist.

static final int

Command to get the player current AudioAttributes.

static final int

Command to get information about the currently playing MediaItem.

static final int

Command to get the device volume and whether it is muted.

static final int

This field is deprecated.

Use COMMAND_GET_METADATA instead.

static final int

Command to get metadata related to the playlist and current MediaItem.

static final int

Command to get the text that should currently be displayed by the player.

static final int

Command to get the information about the current timeline.

static final int

Command to get details of the current track selection.

static final int

Command to get the player volume.

static final int

Represents an invalid Command.

static final int

Command to start, pause or resume playback.

static final int

Command to prepare the player.

static final int

Command to release the player.

static final int

Command to seek back by a fixed increment inside the current MediaItem.

static final int

Command to seek forward by a fixed increment inside the current MediaItem.

static final int

Command to seek anywhere inside the current MediaItem.

static final int

This field is deprecated.

Use COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM instead.

static final int

Command to seek to the default position of the current MediaItem.

static final int

Command to seek anywhere in any MediaItem.

static final int

Command to seek to a later position in the current MediaItem or the default position of the next MediaItem.

static final int

Command to seek to the default position of the next MediaItem.

static final int

This field is deprecated.

Use COMMAND_SEEK_TO_NEXT_MEDIA_ITEM instead.

static final int

Command to seek to an earlier position in the current MediaItem or the default position of the previous MediaItem.

static final int

Command to seek to the default position of the previous MediaItem.

static final int

This field is deprecated.

Use COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM instead.

static final int

This field is deprecated.

Use COMMAND_SEEK_TO_MEDIA_ITEM instead.

static final int

Command to set the player's audio attributes.

static final int

This field is deprecated.

Use COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS instead.

static final int

Command to set the device volume with volume flags.

static final int

Command to set a MediaItem.

static final int

This field is deprecated.

Use COMMAND_SET_PLAYLIST_METADATA instead.

static final int

Command to set the playlist metadata.

static final int

Command to set the repeat mode.

static final int

Command to enable shuffling.

static final int

Command to set the playback speed and pitch.

static final int

Command to set the player's track selection parameters.

static final int

Command to set and clear the surface on which to render the video.

static final int

Command to set the player volume.

static final int

Command to stop playback.

static final int

Automatic playback transition from one period in the timeline to the next.

static final int

Discontinuity introduced internally (e.g. by the source).

static final int

Discontinuity caused by the removal of the current period from the Timeline.

static final int

Seek within the current period or to another period.

static final int

Seek adjustment due to being unable to seek to the requested position or because the seek was permitted to be inexact.

static final int

Discontinuity introduced by a skipped silence.

static final int

Discontinuity introduced by a skipped period (for instance a skipped ad).

static final int

getAudioAttributes changed.

static final int

The audio session id was set.

static final int

isCommandAvailable changed for at least one Command.

static final int

getCurrentCues changed.

static final int

getDeviceInfo changed.

static final int

getDeviceVolume changed.

static final int

isLoading ()} changed.

static final int

isPlaying changed.

static final int

getMaxSeekToPreviousPosition changed.

static final int

getCurrentMediaItem changed or the player started repeating the current item.

static final int

getMediaMetadata changed.

static final int

Metadata associated with the current playback time changed.

static final int

getPlaybackParameters changed.

static final int

getPlaybackState changed.

static final int

getPlaybackSuppressionReason changed.

static final int

getPlayerError changed.

static final int

getPlaylistMetadata changed.

static final int

getPlayWhenReady changed.

static final int

A position discontinuity occurred.

static final int

A frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.

static final int

getRepeatMode changed.

static final int

getSeekBackIncrement changed.

static final int

getSeekForwardIncrement changed.

static final int

getShuffleModeEnabled changed.

static final int

Skipping silences in the audio stream is enabled or disabled.

static final int

The size of the surface onto which the video is being rendered changed.

static final int

getCurrentTimeline changed.

static final int

getCurrentTracks changed.

static final int

getTrackSelectionParameters changed.

static final int

getVideoSize changed.

static final int

getVolume changed.

static final int

Playback has automatically transitioned to the next media item.

static final int

The current media item has changed because of a change in the playlist.

static final int

The media item has been repeated.

static final int

A seek to another media item has occurred.

static final int

Playback is not suppressed.

static final int

Playback is suppressed due to transient audio focus loss.

static final int

Playback is suppressed due to attempt to play on an unsuitable audio output (e.g. attempt to play on built-in speaker on a Wear OS device).

static final int

This field is deprecated.

Use PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT instead.

static final int

Playback has been paused to avoid becoming noisy.

static final int

Playback has been paused because of a loss of audio focus.

static final int

Playback has been paused at the end of a media item.

static final int

Playback has been started or paused because of a remote change.

static final int

Playback has been paused because playback has been suppressed too long.

static final int

Playback has been started or paused by a call to setPlayWhenReady.

static final int

Repeats the entire timeline infinitely.

static final int

Normal playback without repetition.

static final int

Repeats the currently playing MediaItem infinitely during ongoing playback.

static final int

The player is not able to immediately play the media, but is doing work toward being able to do so.

static final int

The player has finished playing the media.

static final int

The player is idle, meaning it holds only limited resources.

static final int

The player is able to immediately play from its current position.

static final int

Timeline changed as a result of a change of the playlist items or the order of the items.

static final int

Timeline changed as a result of a source update (e.g. result of a dynamic update by the played media).

Public constructors

ForwardingPlayer

public ForwardingPlayer(Player player)

Creates a new instance that forwards all operations to player.

Public methods

addListener

public void addListener(Player.Listener listener)

Calls addListener on the delegate.

Overrides of this method must not directly call delegate.addListener. If the override wants to pass the Player.Listener instance to the delegate Player, it must do so by calling super.addListener instead. This ensures the correct Player instance is passed to onEvents (i.e. this forwarding instance, and not the underlying delegate instance).

addMediaItem

public void addMediaItem(MediaItem mediaItem)

Calls addMediaItem on the delegate.

addMediaItem

public void addMediaItem(int index, MediaItem mediaItem)

Calls addMediaItem on the delegate.

addMediaItems

public void addMediaItems(List<MediaItem> mediaItems)

Calls addMediaItems on the delegate.

addMediaItems

public void addMediaItems(int index, List<MediaItem> mediaItems)

Calls addMediaItems on the delegate.

canAdvertiseSession

public boolean canAdvertiseSession()

Calls canAdvertiseSession on the delegate and returns the result.

clearMediaItems

public void clearMediaItems()

Calls clearMediaItems on the delegate.

clearVideoSurface

public void clearVideoSurface()

Calls clearVideoSurface on the delegate.

clearVideoSurface

public void clearVideoSurface(@Nullable Surface surface)

Calls clearVideoSurface on the delegate.

clearVideoSurfaceHolder

public void clearVideoSurfaceHolder(@Nullable SurfaceHolder surfaceHolder)

Calls clearVideoSurfaceHolder on the delegate.

clearVideoSurfaceView

public void clearVideoSurfaceView(@Nullable SurfaceView surfaceView)

Calls clearVideoSurfaceView on the delegate.

clearVideoTextureView

public void clearVideoTextureView(@Nullable TextureView textureView)

Calls clearVideoTextureView on the delegate.

decreaseDeviceVolume

public void decreaseDeviceVolume()

decreaseDeviceVolume

public void decreaseDeviceVolume(@C.VolumeFlags int flags)

Calls decreaseDeviceVolume on the delegate.

getApplicationLooper

public Looper getApplicationLooper()

Calls getApplicationLooper on the delegate and returns the result.

getAudioAttributes

public AudioAttributes getAudioAttributes()

Calls getAudioAttributes on the delegate and returns the result.

getAvailableCommands

public Player.Commands getAvailableCommands()

Calls getAvailableCommands on the delegate and returns the result.

getBufferedPercentage

public int getBufferedPercentage()

Calls getBufferedPercentage on the delegate and returns the result.

getBufferedPosition

public long getBufferedPosition()

Calls getBufferedPosition on the delegate and returns the result.

getContentBufferedPosition

public long getContentBufferedPosition()

Calls getContentBufferedPosition on the delegate and returns the result.

getContentDuration

public long getContentDuration()

Calls getContentDuration on the delegate and returns the result.

getContentPosition

public long getContentPosition()

Calls getContentPosition on the delegate and returns the result.

getCurrentAdGroupIndex

public int getCurrentAdGroupIndex()

Calls getCurrentAdGroupIndex on the delegate and returns the result.

getCurrentAdIndexInAdGroup

public int getCurrentAdIndexInAdGroup()

Calls getCurrentAdIndexInAdGroup on the delegate and returns the result.

getCurrentCues

public CueGroup getCurrentCues()

Calls getCurrentCues on the delegate and returns the result.

getCurrentLiveOffset

public long getCurrentLiveOffset()

Calls getCurrentLiveOffset on the delegate and returns the result.

getCurrentManifest

public @Nullable Object getCurrentManifest()

Calls getCurrentManifest on the delegate and returns the result.

getCurrentMediaItem

public @Nullable MediaItem getCurrentMediaItem()

Calls getCurrentMediaItem on the delegate and returns the result.

getCurrentMediaItemIndex

public int getCurrentMediaItemIndex()

Calls getCurrentMediaItemIndex on the delegate and returns the result.

getCurrentPeriodIndex

public int getCurrentPeriodIndex()

Calls getCurrentPeriodIndex on the delegate and returns the result.

getCurrentPosition

public long getCurrentPosition()

Calls getCurrentPosition on the delegate and returns the result.

getCurrentTimeline

public Timeline getCurrentTimeline()

Calls getCurrentTimeline on the delegate and returns the result.

getCurrentTracks

public Tracks getCurrentTracks()

Calls getCurrentTracks on the delegate and returns the result.

getCurrentWindowIndex

public int getCurrentWindowIndex()

Calls getCurrentWindowIndex on the delegate and returns the result.

getDeviceInfo

public DeviceInfo getDeviceInfo()

Calls getDeviceInfo on the delegate and returns the result.

getDeviceVolume

public int getDeviceVolume()

Calls getDeviceVolume on the delegate and returns the result.

getDuration

public long getDuration()

Calls getDuration on the delegate and returns the result.

getMaxSeekToPreviousPosition

public long getMaxSeekToPreviousPosition()

Calls getMaxSeekToPreviousPosition on the delegate and returns the result.

getMediaItemAt

public MediaItem getMediaItemAt(int index)

Calls getMediaItemAt on the delegate and returns the result.

getMediaItemCount

public int getMediaItemCount()

Calls getMediaItemCount on the delegate and returns the result.

getMediaMetadata

public MediaMetadata getMediaMetadata()

Calls getMediaMetadata on the delegate and returns the result.

getNextMediaItemIndex

public int getNextMediaItemIndex()

Calls getNextMediaItemIndex on the delegate and returns the result.

getNextWindowIndex

public int getNextWindowIndex()

Calls getNextWindowIndex on the delegate and returns the result.

getPlayWhenReady

public boolean getPlayWhenReady()

Calls getPlayWhenReady on the delegate and returns the result.

getPlaybackParameters

public PlaybackParameters getPlaybackParameters()

Calls getPlaybackParameters on the delegate and returns the result.

getPlaybackState

public int getPlaybackState()

Calls getPlaybackState on the delegate and returns the result.

getPlaybackSuppressionReason

public int getPlaybackSuppressionReason()

Calls getPlaybackSuppressionReason on the delegate and returns the result.

getPlayerError

public @Nullable PlaybackException getPlayerError()

Calls getPlayerError on the delegate and returns the result.

getPlaylistMetadata

public MediaMetadata getPlaylistMetadata()

Calls getPlaylistMetadata on the delegate and returns the result.

getPreviousMediaItemIndex

public int getPreviousMediaItemIndex()

Calls getPreviousMediaItemIndex on the delegate and returns the result.

getPreviousWindowIndex

public int getPreviousWindowIndex()

Calls getPreviousWindowIndex on the delegate and returns the result.

getRepeatMode

public int getRepeatMode()

Calls getRepeatMode on the delegate and returns the result.

getSeekBackIncrement

public long getSeekBackIncrement()

Calls getSeekBackIncrement on the delegate and returns the result.

getSeekForwardIncrement

public long getSeekForwardIncrement()

Calls getSeekForwardIncrement on the delegate and returns the result.

getShuffleModeEnabled

public boolean getShuffleModeEnabled()

Calls getShuffleModeEnabled on the delegate and returns the result.

getSurfaceSize

public Size getSurfaceSize()

Calls getSurfaceSize on the delegate and returns the result.

getTotalBufferedDuration

public long getTotalBufferedDuration()

Calls getTotalBufferedDuration on the delegate and returns the result.

getTrackSelectionParameters

public TrackSelectionParameters getTrackSelectionParameters()

Calls getTrackSelectionParameters on the delegate and returns the result.

getVideoSize

public VideoSize getVideoSize()

Calls getVideoSize on the delegate and returns the result.

getVolume

public float getVolume()

Calls getVolume on the delegate and returns the result.

getWrappedPlayer

public Player getWrappedPlayer()

Returns the Player to which operations are forwarded.

hasNext

public boolean hasNext()

Calls hasNext on the delegate and returns the result.

hasNextMediaItem

public boolean hasNextMediaItem()

Calls hasNextMediaItem on the delegate and returns the result.

hasNextWindow

public boolean hasNextWindow()

Calls hasNextWindow on the delegate and returns the result.

hasPrevious

public boolean hasPrevious()

Calls hasPrevious on the delegate and returns the result.

hasPreviousMediaItem

public boolean hasPreviousMediaItem()

Calls hasPreviousMediaItem on the delegate and returns the result.

hasPreviousWindow

public boolean hasPreviousWindow()

Calls hasPreviousWindow on the delegate and returns the result.

increaseDeviceVolume

public void increaseDeviceVolume()

increaseDeviceVolume

public void increaseDeviceVolume(@C.VolumeFlags int flags)

Calls increaseDeviceVolume on the delegate.

isCommandAvailable

public boolean isCommandAvailable(@Player.Command int command)

Calls isCommandAvailable on the delegate and returns the result.

isCurrentMediaItemDynamic

public boolean isCurrentMediaItemDynamic()

Calls isCurrentMediaItemDynamic on the delegate and returns the result.

isCurrentMediaItemLive

public boolean isCurrentMediaItemLive()

Calls isCurrentMediaItemLive on the delegate and returns the result.

isCurrentMediaItemSeekable

public boolean isCurrentMediaItemSeekable()

Calls isCurrentMediaItemSeekable on the delegate and returns the result.

isCurrentWindowDynamic

public boolean isCurrentWindowDynamic()

Calls isCurrentWindowDynamic on the delegate and returns the result.

isCurrentWindowLive

public boolean isCurrentWindowLive()

Calls isCurrentWindowLive on the delegate and returns the result.

isCurrentWindowSeekable

public boolean isCurrentWindowSeekable()

Calls isCurrentWindowSeekable on the delegate and returns the result.

isDeviceMuted

public boolean isDeviceMuted()

Calls isDeviceMuted on the delegate and returns the result.

isLoading

public boolean isLoading()

Calls isLoading on the delegate and returns the result.

isPlaying

public boolean isPlaying()

Calls isPlaying on the delegate and returns the result.

isPlayingAd

public boolean isPlayingAd()

Calls isPlayingAd on the delegate and returns the result.

moveMediaItem

public void moveMediaItem(int currentIndex, int newIndex)

Calls moveMediaItem on the delegate.

moveMediaItems

public void moveMediaItems(int fromIndex, int toIndex, int newIndex)

Calls moveMediaItems on the delegate.

next

public void next()

Calls next on the delegate.

pause

public void pause()

Calls pause on the delegate.

play

public void play()

Calls play on the delegate.

prepare

public void prepare()

Calls prepare on the delegate.

previous

public void previous()

Calls previous on the delegate.

release

public void release()

Calls release on the delegate.

removeListener

public void removeListener(Player.Listener listener)

Calls removeListener on the delegate.

Overrides of this method must not directly call delegate.removeListener. If the override wants to pass the Player.Listener instance to the delegate Player, it must do so by calling super.removeListener instead.

removeMediaItem

public void removeMediaItem(int index)

Calls removeMediaItem on the delegate.

removeMediaItems

public void removeMediaItems(int fromIndex, int toIndex)

Calls removeMediaItems on the delegate.

replaceMediaItem

public void replaceMediaItem(int index, MediaItem mediaItem)

Calls replaceMediaItem on the delegate.

replaceMediaItems

public void replaceMediaItems(
    int fromIndex,
    int toIndex,
    List<MediaItem> mediaItems
)

Calls replaceMediaItems on the delegate.

seekBack

public void seekBack()

Calls seekBack on the delegate.

seekForward

public void seekForward()

Calls seekForward on the delegate.

seekTo

public void seekTo(long positionMs)

Calls seekTo on the delegate.

seekTo

public void seekTo(int mediaItemIndex, long positionMs)

Calls seekTo on the delegate.

seekToDefaultPosition

public void seekToDefaultPosition()

Calls seekToDefaultPosition on the delegate.

seekToDefaultPosition

public void seekToDefaultPosition(int mediaItemIndex)

Calls seekToDefaultPosition on the delegate.

seekToNext

public void seekToNext()

Calls seekToNext on the delegate.

seekToNextMediaItem

public void seekToNextMediaItem()

Calls seekToNextMediaItem on the delegate.

seekToNextWindow

public void seekToNextWindow()

Calls seekToNextWindow on the delegate.

seekToPrevious

public void seekToPrevious()

Calls seekToPrevious on the delegate.

seekToPreviousMediaItem

public void seekToPreviousMediaItem()

Calls seekToPreviousMediaItem on the delegate.

seekToPreviousWindow

public void seekToPreviousWindow()

Calls seekToPreviousWindow on the delegate.

setAudioAttributes

public void setAudioAttributes(
    AudioAttributes audioAttributes,
    boolean handleAudioFocus
)

Calls setAudioAttributes on the delegate.

setDeviceMuted

public void setDeviceMuted(boolean muted)

setDeviceMuted

public void setDeviceMuted(boolean muted, @C.VolumeFlags int flags)

Calls setDeviceMuted on the delegate.

setDeviceVolume

public void setDeviceVolume(int volume)

setDeviceVolume

public void setDeviceVolume(int volume, @C.VolumeFlags int flags)

Calls setDeviceVolume on the delegate.

setMediaItem

public void setMediaItem(MediaItem mediaItem)

Calls setMediaItem on the delegate.

setMediaItem

public void setMediaItem(MediaItem mediaItem, boolean resetPosition)

Calls setMediaItem on the delegate.

setMediaItem

public void setMediaItem(MediaItem mediaItem, long startPositionMs)

Calls setMediaItem on the delegate.

setMediaItems

public void setMediaItems(List<MediaItem> mediaItems)

Calls setMediaItems on the delegate.

setMediaItems

public void setMediaItems(List<MediaItem> mediaItems, boolean resetPosition)

Calls setMediaItems ()} on the delegate.

setMediaItems

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

Calls setMediaItems on the delegate.

setPlayWhenReady

public void setPlayWhenReady(boolean playWhenReady)

Calls setPlayWhenReady on the delegate.

setPlaybackParameters

public void setPlaybackParameters(PlaybackParameters playbackParameters)

Calls setPlaybackParameters on the delegate.

setPlaybackSpeed

public void setPlaybackSpeed(float speed)

Calls setPlaybackSpeed on the delegate.

setPlaylistMetadata

public void setPlaylistMetadata(MediaMetadata mediaMetadata)

Calls setPlaylistMetadata on the delegate.

setRepeatMode

public void setRepeatMode(@Player.RepeatMode int repeatMode)

Calls setRepeatMode on the delegate.

setShuffleModeEnabled

public void setShuffleModeEnabled(boolean shuffleModeEnabled)

Calls setShuffleModeEnabled on the delegate.

setTrackSelectionParameters

public void setTrackSelectionParameters(TrackSelectionParameters parameters)

Calls setTrackSelectionParameters on the delegate.

setVideoSurface

public void setVideoSurface(@Nullable Surface surface)

Calls setVideoSurface on the delegate.

setVideoSurfaceHolder

public void setVideoSurfaceHolder(@Nullable SurfaceHolder surfaceHolder)

Calls setVideoSurfaceHolder on the delegate.

setVideoSurfaceView

public void setVideoSurfaceView(@Nullable SurfaceView surfaceView)

Calls setVideoSurfaceView on the delegate.

setVideoTextureView

public void setVideoTextureView(@Nullable TextureView textureView)

Calls setVideoTextureView on the delegate.

setVolume

public void setVolume(float volume)

Calls setVolume on the delegate.

stop

public void stop()

Calls stop on the delegate.