PillarboxPlayer

Pillarbox Player interface extension.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Listener

Properties

Link copied to clipboard

Smooth seeking enabled

Link copied to clipboard
abstract var trackingEnabled: Boolean

Enable or disable MediaItem tracking

Functions

Link copied to clipboard
abstract fun addListener(p0: Player.Listener)
Link copied to clipboard
abstract fun addMediaItem(p0: MediaItem)
abstract fun addMediaItem(p0: Int, p1: MediaItem)
Link copied to clipboard
abstract fun addMediaItems(p0: Int, p1: MutableList<MediaItem>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun clearMediaItems()
Link copied to clipboard
abstract fun clearVideoSurface()
abstract fun clearVideoSurface(@Nullable p0: Surface?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Player.currentBufferedPercentageAsFlow(updateInterval: Duration = DefaultUpdateInterval): Flow<Float>

Current buffered percentage as flow Player.getBufferedPercentage

Link copied to clipboard

Current media metadata as flow Player.getCurrentMediaItem

Link copied to clipboard
fun Player.currentMediaMetadataAsFlow(withPlaylistMediaMetadata: Boolean = false): Flow<MediaMetadata>

Current media metadata as flow Player.getMediaMetadata

Link copied to clipboard
fun Player.currentPositionAsFlow(updateInterval: Duration = DefaultUpdateInterval): Flow<Long>

Current position of the player updates every updateInterval when it is playing. Send current position once if not playing.

Link copied to clipboard

Current position percent

Link copied to clipboard
abstract fun decreaseDeviceVolume()
abstract fun decreaseDeviceVolume(p0: Int)
Link copied to clipboard

Disable the audio track.

Link copied to clipboard

Disable the text track.

Link copied to clipboard

Disable the video track.

Link copied to clipboard

Duration Player.getDuration as Flow.

Link copied to clipboard

Enable the audio track.

Link copied to clipboard

Enable the text track.

Link copied to clipboard

Enable the video track.

Link copied to clipboard
Link copied to clipboard
fun Player.getAspectRatioAsFlow(defaultAspectRatio: Float): Flow<Float>

Get aspect ratio of the current video as Flow.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@IntRange(from = 0, to = 100)
abstract fun getBufferedPercentage(): Int
Link copied to clipboard
abstract fun getBufferedPosition(): Long
Link copied to clipboard
fun Player.getChapterAtPosition(positionMs: Long = currentPosition): Chapter?

Get the chapter at position.

Link copied to clipboard
Link copied to clipboard
abstract fun getContentDuration(): Long
Link copied to clipboard
abstract fun getContentPosition(): Long
Link copied to clipboard
fun Player.getCreditAtPosition(positionMs: Long = currentPosition): Credit?

Get the credit at position.

Link copied to clipboard
abstract fun getCurrentAdGroupIndex(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getCurrentCues(): CueGroup
Link copied to clipboard
abstract fun getCurrentLiveOffset(): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get current media item index as flow Player.getCurrentMediaItemIndex

Link copied to clipboard

Get a snapshot of the current media items

Link copied to clipboard

Get current media items as flow Player.getCurrentMediaItems

Link copied to clipboard
abstract fun getCurrentPeriodIndex(): Int
Link copied to clipboard
abstract fun getCurrentPosition(): Long
Link copied to clipboard
Link copied to clipboard
abstract fun getCurrentTracks(): Tracks
Link copied to clipboard

Get current tracks as flow Player.getCurrentTracks

Link copied to clipboard
Link copied to clipboard
abstract fun getDeviceInfo(): DeviceInfo
Link copied to clipboard
@IntRange(from = 0)
abstract fun getDeviceVolume(): Int
Link copied to clipboard
abstract fun getDuration(): Long
Link copied to clipboard
Link copied to clipboard
abstract fun getMediaItemAt(p0: Int): MediaItem
Link copied to clipboard
abstract fun getMediaItemCount(): Int
Link copied to clipboard
Link copied to clipboard
abstract fun getNextMediaItemIndex(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get playback speed

Link copied to clipboard

Playback speed Player.getPlaybackSpeed as Flow.

Link copied to clipboard
abstract fun getPlaybackState(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getPlayWhenReady(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getRepeatMode(): Int
Link copied to clipboard
abstract fun getSeekBackIncrement(): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getVideoSize(): VideoSize
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
abstract fun getVolume(): Float
Link copied to clipboard
abstract operator fun hasNext(): Boolean
Link copied to clipboard
abstract fun hasNextMediaItem(): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun increaseDeviceVolume()
abstract fun increaseDeviceVolume(p0: Int)
Link copied to clipboard
fun Player.isAtLiveEdge(positionMs: Long = currentPosition, window: Timeline.Window = Window()): Boolean

Is at live edge

Link copied to clipboard
abstract fun isCommandAvailable(p0: Int): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun isDeviceMuted(): Boolean
Link copied to clipboard
abstract fun isLoading(): Boolean
Link copied to clipboard
fun Player.isPlaybackSpeedPossibleAtPosition(position: Long, speed: Float, window: Timeline.Window = Window()): Boolean

Return if the playback speed is possible at position. Always return true for none live content or if Player.getCurrentTimeline is empty.

Link copied to clipboard
abstract fun isPlaying(): Boolean
Link copied to clipboard
abstract fun isPlayingAd(): Boolean
Link copied to clipboard

Is playing Player.isPlaying as Flow.

Link copied to clipboard

Media item count Player.getMediaItemCount as Flow.

Link copied to clipboard
abstract fun moveMediaItem(p0: Int, p1: Int)
Link copied to clipboard
abstract fun moveMediaItems(p0: Int, p1: Int, p2: Int)
Link copied to clipboard
abstract operator fun next()
Link copied to clipboard
abstract fun pause()
Link copied to clipboard
abstract fun play()
Link copied to clipboard

Playback state Player.getPlaybackState as flow.

Link copied to clipboard
Link copied to clipboard

Play when ready as flow Player.getPlayWhenReady

Link copied to clipboard
abstract fun prepare()
Link copied to clipboard
abstract fun previous()
Link copied to clipboard
abstract fun release()
Link copied to clipboard
Link copied to clipboard
abstract fun removeMediaItem(p0: Int)
Link copied to clipboard
abstract fun removeMediaItems(p0: Int, p1: Int)
Link copied to clipboard
abstract fun replaceMediaItem(p0: Int, p1: MediaItem)
Link copied to clipboard
abstract fun replaceMediaItems(p0: Int, p1: Int, p2: MutableList<MediaItem>)
Link copied to clipboard

Run the task in the same thread as Player.getApplicationLooper if it is necessary.

Link copied to clipboard
abstract fun seekBack()
Link copied to clipboard
abstract fun seekForward()
Link copied to clipboard
abstract fun seekTo(p0: Long)
abstract fun seekTo(p0: Int, p1: Long)
Link copied to clipboard
abstract fun seekToDefaultPosition()
abstract fun seekToDefaultPosition(p0: Int)
Link copied to clipboard
abstract fun seekToNext()
Link copied to clipboard
abstract fun seekToNextMediaItem()
Link copied to clipboard
Link copied to clipboard
abstract fun seekToPrevious()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Select the provided track.

Link copied to clipboard
Link copied to clipboard

Restore the default audio track.

Link copied to clipboard

Restore the default text track.

Link copied to clipboard

Restore the default video track.

Link copied to clipboard
abstract fun setDeviceMuted(p0: Boolean)
abstract fun setDeviceMuted(p0: Boolean, p1: Int)
Link copied to clipboard
abstract fun setDeviceVolume(@IntRange(from = 0) p0: Int)
abstract fun setDeviceVolume(@IntRange(from = 0) p0: Int, p1: Int)
Link copied to clipboard
fun Player.setHandleAudioFocus(handleAudioFocus: Boolean)

Handle audio focus with the currently set AudioAttributes.

Link copied to clipboard
abstract fun setMediaItem(p0: MediaItem)
abstract fun setMediaItem(p0: MediaItem, p1: Boolean)
abstract fun setMediaItem(p0: MediaItem, p1: Long)
Link copied to clipboard
abstract fun setMediaItems(p0: MutableList<MediaItem>, p1: Boolean)
abstract fun setMediaItems(p0: MutableList<MediaItem>, p1: Int, p2: Long)
Link copied to clipboard
Link copied to clipboard
abstract fun setPlaybackSpeed(@FloatRange(from = 0.0, fromInclusive = false) p0: Float)
Link copied to clipboard
Link copied to clipboard
abstract fun setPlayWhenReady(p0: Boolean)
Link copied to clipboard
abstract fun setRepeatMode(p0: Int)
Link copied to clipboard
abstract fun setShuffleModeEnabled(p0: Boolean)
Link copied to clipboard

Set track override.

Link copied to clipboard
abstract fun setVideoSurface(@Nullable p0: Surface?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun setVolume(@FloatRange(from = 0.0, to = 1.0) p0: Float)
Link copied to clipboard

Shuffle mode enabled Player.getShuffleModeEnabled as Flow.

Link copied to clipboard
abstract fun stop()
Link copied to clipboard
fun Player.tickerWhilePlayingAsFlow(interval: Duration = DefaultUpdateInterval): Flow<Unit>

Ticker emits event every interval when Player.isPlaying is true. Emit a value once at least once.

Link copied to clipboard

Get video size as flow Player.getVideoSize