ForwardingPlayer


@UnstableApi
class ForwardingPlayer : 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 functions

Unit

Calls addListener on the delegate.

Unit
addMediaItem(mediaItem: MediaItem!)

Calls addMediaItem on the delegate.

Unit
addMediaItem(index: Int, mediaItem: MediaItem!)

Calls addMediaItem on the delegate.

Unit

Calls addMediaItems on the delegate.

Unit
addMediaItems(index: Int, mediaItems: (Mutable)List<MediaItem!>!)

Calls addMediaItems on the delegate.

Boolean

Calls canAdvertiseSession on the delegate and returns the result.

Unit

Calls clearMediaItems on the delegate.

Unit

Calls clearVideoSurface on the delegate.

Unit

Calls clearVideoSurface on the delegate.

Unit

Calls clearVideoSurfaceHolder on the delegate.

Unit

Calls clearVideoSurfaceView on the delegate.

Unit

Calls clearVideoTextureView on the delegate.

Unit

This function is deprecated.

Use decreaseDeviceVolume instead.

Unit

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.

Any?

Calls getCurrentManifest on the delegate and returns the result.

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 function 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!

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 function 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.

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 function 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 function is deprecated.

Use hasNextMediaItem instead.

Boolean

Calls hasNextMediaItem on the delegate and returns the result.

Boolean

This function is deprecated.

Use hasNextMediaItem instead.

Boolean

Calls hasPreviousMediaItem on the delegate and returns the result.

Unit

This function is deprecated.

Use increaseDeviceVolume instead.

Unit

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 function is deprecated.

Use isCurrentMediaItemDynamic instead.

Boolean

This function is deprecated.

Use isCurrentMediaItemLive instead.

Boolean

This function 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.

Unit
moveMediaItem(currentIndex: Int, newIndex: Int)

Calls moveMediaItem on the delegate.

Unit
moveMediaItems(fromIndex: Int, toIndex: Int, newIndex: Int)

Calls moveMediaItems on the delegate.

Unit

This function is deprecated.

Use seekToNextMediaItem instead.

Unit

Calls pause on the delegate.

Unit

Calls play on the delegate.

Unit

Calls prepare on the delegate.

Unit

Calls release on the delegate.

Unit

Calls removeListener on the delegate.

Unit

Calls removeMediaItem on the delegate.

Unit
removeMediaItems(fromIndex: Int, toIndex: Int)

Calls removeMediaItems on the delegate.

Unit
replaceMediaItem(index: Int, mediaItem: MediaItem!)

Calls replaceMediaItem on the delegate.

Unit
replaceMediaItems(
    fromIndex: Int,
    toIndex: Int,
    mediaItems: (Mutable)List<MediaItem!>!
)

Calls replaceMediaItems on the delegate.

Unit

Calls seekBack on the delegate.

Unit

Calls seekForward on the delegate.

Unit
seekTo(positionMs: Long)

Calls seekTo on the delegate.

Unit
seekTo(mediaItemIndex: Int, positionMs: Long)

Calls seekTo on the delegate.

Unit

Calls seekToDefaultPosition on the delegate.

Unit
seekToDefaultPosition(mediaItemIndex: Int)

Calls seekToDefaultPosition on the delegate.

Unit

Calls seekToNext on the delegate.

Unit

Calls seekToNextMediaItem on the delegate.

Unit

This function is deprecated.

Use seekToNextMediaItem instead.

Unit

Calls seekToPrevious on the delegate.

Unit

Calls seekToPreviousMediaItem on the delegate.

Unit

This function is deprecated.

Use seekToPreviousMediaItem instead.

Unit
setAudioAttributes(
    audioAttributes: AudioAttributes!,
    handleAudioFocus: Boolean
)

Calls setAudioAttributes on the delegate.

Unit

This function is deprecated.

Use setDeviceMuted instead.

Unit

Calls setDeviceMuted on the delegate.

Unit

This function is deprecated.

Use setDeviceVolume instead.

Unit
setDeviceVolume(volume: Int, @C.VolumeFlags flags: Int)

Calls setDeviceVolume on the delegate.

Unit
setMediaItem(mediaItem: MediaItem!)

Calls setMediaItem on the delegate.

Unit
setMediaItem(mediaItem: MediaItem!, resetPosition: Boolean)

Calls setMediaItem on the delegate.

Unit
setMediaItem(mediaItem: MediaItem!, startPositionMs: Long)

Calls setMediaItem on the delegate.

Unit

Calls setMediaItems on the delegate.

Unit
setMediaItems(
    mediaItems: (Mutable)List<MediaItem!>!,
    resetPosition: Boolean
)

Calls setMediaItems ()} on the delegate.

Unit
setMediaItems(
    mediaItems: (Mutable)List<MediaItem!>!,
    startIndex: Int,
    startPositionMs: Long
)

Calls setMediaItems on the delegate.

Unit
setPlayWhenReady(playWhenReady: Boolean)

Calls setPlayWhenReady on the delegate.

Unit

Calls setPlaybackParameters on the delegate.

Unit

Calls setPlaybackSpeed on the delegate.

Unit

Calls setPlaylistMetadata on the delegate.

Unit

Calls setRepeatMode on the delegate.

Unit
setShuffleModeEnabled(shuffleModeEnabled: Boolean)

Calls setShuffleModeEnabled on the delegate.

Unit

Calls setTrackSelectionParameters on the delegate.

Unit

Calls setVideoSurface on the delegate.

Unit

Calls setVideoSurfaceHolder on the delegate.

Unit

Calls setVideoSurfaceView on the delegate.

Unit

Calls setVideoTextureView on the delegate.

Unit
setVolume(volume: Float)

Calls setVolume on the delegate.

Unit

Calls stop on the delegate.

Inherited Constants

From androidx.media3.common.Player
const Int

This property is deprecated.

Use COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS instead.

const Int

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

const Int

Command to change the media items in the playlist.

const Int

Command to get the player current AudioAttributes.

const Int

Command to get information about the currently playing MediaItem.

const Int

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

const Int

This property is deprecated.

Use COMMAND_GET_METADATA instead.

const Int

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

const Int

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

const Int

Command to get the information about the current timeline.

const Int

Command to get details of the current track selection.

const Int

Command to get the player volume.

const Int

Represents an invalid Command.

const Int

Command to start, pause or resume playback.

const Int

Command to prepare the player.

const Int

Command to release the player.

const Int

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

const Int

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

const Int

Command to seek anywhere inside the current MediaItem.

const Int

This property is deprecated.

Use COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM instead.

const Int

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

const Int

Command to seek anywhere in any MediaItem.

const Int

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

const Int

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

const Int

This property is deprecated.

Use COMMAND_SEEK_TO_NEXT_MEDIA_ITEM instead.

const Int

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

const Int

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

const Int

This property is deprecated.

Use COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM instead.

const Int

This property is deprecated.

Use COMMAND_SEEK_TO_MEDIA_ITEM instead.

const Int

Command to set the player's audio attributes.

const Int

This property is deprecated.

Use COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS instead.

const Int

Command to set the device volume with volume flags.

const Int

Command to set a MediaItem.

const Int

This property is deprecated.

Use COMMAND_SET_PLAYLIST_METADATA instead.

const Int

Command to set the playlist metadata.

const Int

Command to set the repeat mode.

const Int

Command to enable shuffling.

const Int

Command to set the playback speed and pitch.

const Int

Command to set the player's track selection parameters.

const Int

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

const Int

Command to set the player volume.

const Int

Command to stop playback.

const Int

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

const Int

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

const Int

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

const Int

Seek within the current period or to another period.

const Int

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

const Int

Discontinuity introduced by a skipped silence.

const Int

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

const Int

getAudioAttributes changed.

const Int

The audio session id was set.

const Int

isCommandAvailable changed for at least one Command.

const Int

getCurrentCues changed.

const Int

getDeviceInfo changed.

const Int

getDeviceVolume changed.

const Int

isLoading ()} changed.

const Int

isPlaying changed.

const Int

getMaxSeekToPreviousPosition changed.

const Int

getCurrentMediaItem changed or the player started repeating the current item.

const Int

getMediaMetadata changed.

const Int

Metadata associated with the current playback time changed.

const Int

getPlaybackParameters changed.

const Int

getPlaybackState changed.

const Int

getPlaybackSuppressionReason changed.

const Int

getPlayerError changed.

const Int

getPlaylistMetadata changed.

const Int

getPlayWhenReady changed.

const Int

A position discontinuity occurred.

const 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.

const Int

getRepeatMode changed.

const Int

getSeekBackIncrement changed.

const Int

getSeekForwardIncrement changed.

const Int

getShuffleModeEnabled changed.

const Int

Skipping silences in the audio stream is enabled or disabled.

const Int

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

const Int

getCurrentTimeline changed.

const Int

getCurrentTracks changed.

const Int

getTrackSelectionParameters changed.

const Int

getVideoSize changed.

const Int

getVolume changed.

const Int

Playback has automatically transitioned to the next media item.

const Int

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

const Int

The media item has been repeated.

const Int

A seek to another media item has occurred.

const Int

Playback is not suppressed.

const Int

Playback is suppressed due to transient audio focus loss.

const 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).

const Int

This property is deprecated.

Use PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT instead.

const Int

Playback has been paused to avoid becoming noisy.

const Int

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

const Int

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

const Int

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

const Int

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

const Int

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

const Int

Repeats the entire timeline infinitely.

const Int

Normal playback without repetition.

const Int

Repeats the currently playing MediaItem infinitely during ongoing playback.

const Int

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

const Int

The player has finished playing the media.

const Int

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

const Int

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

const Int

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

const Int

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

Public constructors

ForwardingPlayer

ForwardingPlayer(player: Player!)

Creates a new instance that forwards all operations to player.

Public functions

addListener

fun addListener(listener: Player.Listener!): Unit

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

fun addMediaItem(mediaItem: MediaItem!): Unit

Calls addMediaItem on the delegate.

addMediaItem

fun addMediaItem(index: Int, mediaItem: MediaItem!): Unit

Calls addMediaItem on the delegate.

addMediaItems

fun addMediaItems(mediaItems: (Mutable)List<MediaItem!>!): Unit

Calls addMediaItems on the delegate.

addMediaItems

fun addMediaItems(index: Int, mediaItems: (Mutable)List<MediaItem!>!): Unit

Calls addMediaItems on the delegate.

canAdvertiseSession

fun canAdvertiseSession(): Boolean

Calls canAdvertiseSession on the delegate and returns the result.

clearMediaItems

fun clearMediaItems(): Unit

Calls clearMediaItems on the delegate.

clearVideoSurface

fun clearVideoSurface(): Unit

Calls clearVideoSurface on the delegate.

clearVideoSurface

fun clearVideoSurface(surface: Surface?): Unit

Calls clearVideoSurface on the delegate.

clearVideoSurfaceHolder

fun clearVideoSurfaceHolder(surfaceHolder: SurfaceHolder?): Unit

Calls clearVideoSurfaceHolder on the delegate.

clearVideoSurfaceView

fun clearVideoSurfaceView(surfaceView: SurfaceView?): Unit

Calls clearVideoSurfaceView on the delegate.

clearVideoTextureView

fun clearVideoTextureView(textureView: TextureView?): Unit

Calls clearVideoTextureView on the delegate.

decreaseDeviceVolume

fun decreaseDeviceVolume(): Unit

decreaseDeviceVolume

fun decreaseDeviceVolume(@C.VolumeFlags flags: Int): Unit

Calls decreaseDeviceVolume on the delegate.

getApplicationLooper

fun getApplicationLooper(): Looper!

Calls getApplicationLooper on the delegate and returns the result.

getAudioAttributes

fun getAudioAttributes(): AudioAttributes!

Calls getAudioAttributes on the delegate and returns the result.

getAvailableCommands

fun getAvailableCommands(): Player.Commands!

Calls getAvailableCommands on the delegate and returns the result.

getBufferedPercentage

fun getBufferedPercentage(): Int

Calls getBufferedPercentage on the delegate and returns the result.

getBufferedPosition

fun getBufferedPosition(): Long

Calls getBufferedPosition on the delegate and returns the result.

getContentBufferedPosition

fun getContentBufferedPosition(): Long

Calls getContentBufferedPosition on the delegate and returns the result.

getContentDuration

fun getContentDuration(): Long

Calls getContentDuration on the delegate and returns the result.

getContentPosition

fun getContentPosition(): Long

Calls getContentPosition on the delegate and returns the result.

getCurrentAdGroupIndex

fun getCurrentAdGroupIndex(): Int

Calls getCurrentAdGroupIndex on the delegate and returns the result.

getCurrentAdIndexInAdGroup

fun getCurrentAdIndexInAdGroup(): Int

Calls getCurrentAdIndexInAdGroup on the delegate and returns the result.

getCurrentCues

fun getCurrentCues(): CueGroup!

Calls getCurrentCues on the delegate and returns the result.

getCurrentLiveOffset

fun getCurrentLiveOffset(): Long

Calls getCurrentLiveOffset on the delegate and returns the result.

getCurrentManifest

fun getCurrentManifest(): Any?

Calls getCurrentManifest on the delegate and returns the result.

getCurrentMediaItem

fun getCurrentMediaItem(): MediaItem?

Calls getCurrentMediaItem on the delegate and returns the result.

getCurrentMediaItemIndex

fun getCurrentMediaItemIndex(): Int

Calls getCurrentMediaItemIndex on the delegate and returns the result.

getCurrentPeriodIndex

fun getCurrentPeriodIndex(): Int

Calls getCurrentPeriodIndex on the delegate and returns the result.

getCurrentPosition

fun getCurrentPosition(): Long

Calls getCurrentPosition on the delegate and returns the result.

getCurrentTimeline

fun getCurrentTimeline(): Timeline!

Calls getCurrentTimeline on the delegate and returns the result.

getCurrentTracks

fun getCurrentTracks(): Tracks!

Calls getCurrentTracks on the delegate and returns the result.

getCurrentWindowIndex

fun getCurrentWindowIndex(): Int

Calls getCurrentWindowIndex on the delegate and returns the result.

getDeviceInfo

fun getDeviceInfo(): DeviceInfo!

Calls getDeviceInfo on the delegate and returns the result.

getDeviceVolume

fun getDeviceVolume(): Int

Calls getDeviceVolume on the delegate and returns the result.

getDuration

fun getDuration(): Long

Calls getDuration on the delegate and returns the result.

getMaxSeekToPreviousPosition

fun getMaxSeekToPreviousPosition(): Long

Calls getMaxSeekToPreviousPosition on the delegate and returns the result.

getMediaItemAt

fun getMediaItemAt(index: Int): MediaItem!

Calls getMediaItemAt on the delegate and returns the result.

getMediaItemCount

fun getMediaItemCount(): Int

Calls getMediaItemCount on the delegate and returns the result.

getMediaMetadata

fun getMediaMetadata(): MediaMetadata!

Calls getMediaMetadata on the delegate and returns the result.

getNextMediaItemIndex

fun getNextMediaItemIndex(): Int

Calls getNextMediaItemIndex on the delegate and returns the result.

getNextWindowIndex

fun getNextWindowIndex(): Int

Calls getNextWindowIndex on the delegate and returns the result.

getPlayWhenReady

fun getPlayWhenReady(): Boolean

Calls getPlayWhenReady on the delegate and returns the result.

getPlaybackParameters

fun getPlaybackParameters(): PlaybackParameters!

Calls getPlaybackParameters on the delegate and returns the result.

getPlaybackState

fun getPlaybackState(): Int

Calls getPlaybackState on the delegate and returns the result.

getPlaybackSuppressionReason

fun getPlaybackSuppressionReason(): Int

Calls getPlaybackSuppressionReason on the delegate and returns the result.

getPlayerError

fun getPlayerError(): PlaybackException?

Calls getPlayerError on the delegate and returns the result.

getPlaylistMetadata

fun getPlaylistMetadata(): MediaMetadata!

Calls getPlaylistMetadata on the delegate and returns the result.

getPreviousMediaItemIndex

fun getPreviousMediaItemIndex(): Int

Calls getPreviousMediaItemIndex on the delegate and returns the result.

getPreviousWindowIndex

fun getPreviousWindowIndex(): Int

Calls getPreviousWindowIndex on the delegate and returns the result.

getRepeatMode

fun getRepeatMode(): Int

Calls getRepeatMode on the delegate and returns the result.

getSeekBackIncrement

fun getSeekBackIncrement(): Long

Calls getSeekBackIncrement on the delegate and returns the result.

getSeekForwardIncrement

fun getSeekForwardIncrement(): Long

Calls getSeekForwardIncrement on the delegate and returns the result.

getShuffleModeEnabled

fun getShuffleModeEnabled(): Boolean

Calls getShuffleModeEnabled on the delegate and returns the result.

getSurfaceSize

fun getSurfaceSize(): Size!

Calls getSurfaceSize on the delegate and returns the result.

getTotalBufferedDuration

fun getTotalBufferedDuration(): Long

Calls getTotalBufferedDuration on the delegate and returns the result.

getTrackSelectionParameters

fun getTrackSelectionParameters(): TrackSelectionParameters!

Calls getTrackSelectionParameters on the delegate and returns the result.

getVideoSize

fun getVideoSize(): VideoSize!

Calls getVideoSize on the delegate and returns the result.

getVolume

fun getVolume(): Float

Calls getVolume on the delegate and returns the result.

getWrappedPlayer

fun getWrappedPlayer(): Player!

Returns the Player to which operations are forwarded.

hasNext

fun hasNext(): Boolean

Calls hasNext on the delegate and returns the result.

hasNextMediaItem

fun hasNextMediaItem(): Boolean

Calls hasNextMediaItem on the delegate and returns the result.

hasNextWindow

fun hasNextWindow(): Boolean

Calls hasNextWindow on the delegate and returns the result.

hasPreviousMediaItem

fun hasPreviousMediaItem(): Boolean

Calls hasPreviousMediaItem on the delegate and returns the result.

increaseDeviceVolume

fun increaseDeviceVolume(): Unit

increaseDeviceVolume

fun increaseDeviceVolume(@C.VolumeFlags flags: Int): Unit

Calls increaseDeviceVolume on the delegate.

isCommandAvailable

fun isCommandAvailable(@Player.Command command: Int): Boolean

Calls isCommandAvailable on the delegate and returns the result.

isCurrentMediaItemDynamic

fun isCurrentMediaItemDynamic(): Boolean

Calls isCurrentMediaItemDynamic on the delegate and returns the result.

isCurrentMediaItemLive

fun isCurrentMediaItemLive(): Boolean

Calls isCurrentMediaItemLive on the delegate and returns the result.

isCurrentMediaItemSeekable

fun isCurrentMediaItemSeekable(): Boolean

Calls isCurrentMediaItemSeekable on the delegate and returns the result.

isCurrentWindowDynamic

fun isCurrentWindowDynamic(): Boolean

Calls isCurrentWindowDynamic on the delegate and returns the result.

isCurrentWindowLive

fun isCurrentWindowLive(): Boolean

Calls isCurrentWindowLive on the delegate and returns the result.

isCurrentWindowSeekable

fun isCurrentWindowSeekable(): Boolean

Calls isCurrentWindowSeekable on the delegate and returns the result.

isDeviceMuted

fun isDeviceMuted(): Boolean

Calls isDeviceMuted on the delegate and returns the result.

isLoading

fun isLoading(): Boolean

Calls isLoading on the delegate and returns the result.

isPlaying

fun isPlaying(): Boolean

Calls isPlaying on the delegate and returns the result.

isPlayingAd

fun isPlayingAd(): Boolean

Calls isPlayingAd on the delegate and returns the result.

moveMediaItem

fun moveMediaItem(currentIndex: Int, newIndex: Int): Unit

Calls moveMediaItem on the delegate.

moveMediaItems

fun moveMediaItems(fromIndex: Int, toIndex: Int, newIndex: Int): Unit

Calls moveMediaItems on the delegate.

next

fun next(): Unit

Calls next on the delegate.

pause

fun pause(): Unit

Calls pause on the delegate.

play

fun play(): Unit

Calls play on the delegate.

prepare

fun prepare(): Unit

Calls prepare on the delegate.

release

fun release(): Unit

Calls release on the delegate.

removeListener

fun removeListener(listener: Player.Listener!): Unit

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

fun removeMediaItem(index: Int): Unit

Calls removeMediaItem on the delegate.

removeMediaItems

fun removeMediaItems(fromIndex: Int, toIndex: Int): Unit

Calls removeMediaItems on the delegate.

replaceMediaItem

fun replaceMediaItem(index: Int, mediaItem: MediaItem!): Unit

Calls replaceMediaItem on the delegate.

replaceMediaItems

fun replaceMediaItems(
    fromIndex: Int,
    toIndex: Int,
    mediaItems: (Mutable)List<MediaItem!>!
): Unit

Calls replaceMediaItems on the delegate.

seekBack

fun seekBack(): Unit

Calls seekBack on the delegate.

seekForward

fun seekForward(): Unit

Calls seekForward on the delegate.

seekTo

fun seekTo(positionMs: Long): Unit

Calls seekTo on the delegate.

seekTo

fun seekTo(mediaItemIndex: Int, positionMs: Long): Unit

Calls seekTo on the delegate.

seekToDefaultPosition

fun seekToDefaultPosition(): Unit

Calls seekToDefaultPosition on the delegate.

seekToDefaultPosition

fun seekToDefaultPosition(mediaItemIndex: Int): Unit

Calls seekToDefaultPosition on the delegate.

seekToNext

fun seekToNext(): Unit

Calls seekToNext on the delegate.

seekToNextMediaItem

fun seekToNextMediaItem(): Unit

Calls seekToNextMediaItem on the delegate.

seekToNextWindow

fun seekToNextWindow(): Unit

Calls seekToNextWindow on the delegate.

seekToPrevious

fun seekToPrevious(): Unit

Calls seekToPrevious on the delegate.

seekToPreviousMediaItem

fun seekToPreviousMediaItem(): Unit

Calls seekToPreviousMediaItem on the delegate.

seekToPreviousWindow

fun seekToPreviousWindow(): Unit

Calls seekToPreviousWindow on the delegate.

setAudioAttributes

fun setAudioAttributes(
    audioAttributes: AudioAttributes!,
    handleAudioFocus: Boolean
): Unit

Calls setAudioAttributes on the delegate.

setDeviceMuted

fun setDeviceMuted(muted: Boolean): Unit

setDeviceMuted

fun setDeviceMuted(muted: Boolean, @C.VolumeFlags flags: Int): Unit

Calls setDeviceMuted on the delegate.

setDeviceVolume

fun setDeviceVolume(volume: Int): Unit

setDeviceVolume

fun setDeviceVolume(volume: Int, @C.VolumeFlags flags: Int): Unit

Calls setDeviceVolume on the delegate.

setMediaItem

fun setMediaItem(mediaItem: MediaItem!): Unit

Calls setMediaItem on the delegate.

setMediaItem

fun setMediaItem(mediaItem: MediaItem!, resetPosition: Boolean): Unit

Calls setMediaItem on the delegate.

setMediaItem

fun setMediaItem(mediaItem: MediaItem!, startPositionMs: Long): Unit

Calls setMediaItem on the delegate.

setMediaItems

fun setMediaItems(mediaItems: (Mutable)List<MediaItem!>!): Unit

Calls setMediaItems on the delegate.

setMediaItems

fun setMediaItems(
    mediaItems: (Mutable)List<MediaItem!>!,
    resetPosition: Boolean
): Unit

Calls setMediaItems ()} on the delegate.

setMediaItems

fun setMediaItems(
    mediaItems: (Mutable)List<MediaItem!>!,
    startIndex: Int,
    startPositionMs: Long
): Unit

Calls setMediaItems on the delegate.

setPlayWhenReady

fun setPlayWhenReady(playWhenReady: Boolean): Unit

Calls setPlayWhenReady on the delegate.

setPlaybackParameters

fun setPlaybackParameters(playbackParameters: PlaybackParameters!): Unit

Calls setPlaybackParameters on the delegate.

setPlaybackSpeed

fun setPlaybackSpeed(speed: Float): Unit

Calls setPlaybackSpeed on the delegate.

setPlaylistMetadata

fun setPlaylistMetadata(mediaMetadata: MediaMetadata!): Unit

Calls setPlaylistMetadata on the delegate.

setRepeatMode

fun setRepeatMode(@Player.RepeatMode repeatMode: Int): Unit

Calls setRepeatMode on the delegate.

setShuffleModeEnabled

fun setShuffleModeEnabled(shuffleModeEnabled: Boolean): Unit

Calls setShuffleModeEnabled on the delegate.

setTrackSelectionParameters

fun setTrackSelectionParameters(parameters: TrackSelectionParameters!): Unit

Calls setTrackSelectionParameters on the delegate.

setVideoSurface

fun setVideoSurface(surface: Surface?): Unit

Calls setVideoSurface on the delegate.

setVideoSurfaceHolder

fun setVideoSurfaceHolder(surfaceHolder: SurfaceHolder?): Unit

Calls setVideoSurfaceHolder on the delegate.

setVideoSurfaceView

fun setVideoSurfaceView(surfaceView: SurfaceView?): Unit

Calls setVideoSurfaceView on the delegate.

setVideoTextureView

fun setVideoTextureView(textureView: TextureView?): Unit

Calls setVideoTextureView on the delegate.

setVolume

fun setVolume(volume: Float): Unit

Calls setVolume on the delegate.

stop

fun stop(): Unit

Calls stop on the delegate.