PillarboxPlayer

Pillarbox Player interface extension.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard

A listener for events specific to Pillarbox.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:IntRange(from = 0, to = 100)
abstract val bufferedPercentage: Int
Link copied to clipboard
abstract val bufferedPosition: Long
Link copied to clipboard
Link copied to clipboard
abstract val contentDuration: Long
Link copied to clipboard
abstract val contentPosition: Long
Link copied to clipboard
abstract val currentAdGroupIndex: Int
Link copied to clipboard
Link copied to clipboard
abstract val currentCues: CueGroup
Link copied to clipboard
abstract val currentLiveOffset: Long
Link copied to clipboard
abstract val currentManifest: Any?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val currentPeriodIndex: Int
Link copied to clipboard
abstract val currentPosition: Long
Link copied to clipboard
Link copied to clipboard
abstract val currentTracks: Tracks
Link copied to clipboard
Link copied to clipboard
abstract val deviceInfo: DeviceInfo
Link copied to clipboard
@get:IntRange(from = 0)
abstract var deviceVolume: Int
Link copied to clipboard
abstract val duration: Long
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 var isDeviceMuted: Boolean
Link copied to clipboard
abstract val isLoading: Boolean
Link copied to clipboard
abstract val isPlaying: Boolean
Link copied to clipboard
abstract val isPlayingAd: Boolean
Link copied to clipboard
Link copied to clipboard
abstract val mediaItemCount: Int
Link copied to clipboard
Link copied to clipboard
abstract val nextMediaItemIndex: Int
Link copied to clipboard
abstract val nextWindowIndex: Int
Link copied to clipboard
Link copied to clipboard
abstract val playbackState: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var playWhenReady: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract var repeatMode: Int
Link copied to clipboard
abstract val seekBackIncrement: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Controls whether smooth seeking behavior is enabled.

Link copied to clipboard
abstract val surfaceSize: Size
Link copied to clipboard
Link copied to clipboard
abstract var trackingEnabled: Boolean

Controls whether media item tracking is enabled.

Link copied to clipboard
abstract val videoSize: VideoSize
Link copied to clipboard
@get:FloatRange(from = 0.0, to = 1.0)
abstract var volume: Float

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: List<MediaItem>)
abstract fun addMediaItems(p0: Int, p1: List<MediaItem>)
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>

Collects the buffered percentage as a Flow.

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

Collects the media metadata as a Flow.

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

Collects the current position of the player as a Flow.

Link copied to clipboard

Returns the current playback position as a percentage of the total duration.

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

Disables the audio track.

Link copied to clipboard

Disables the text track.

Link copied to clipboard

Disables the video track.

Link copied to clipboard

Collects the duration as a Flow.

Link copied to clipboard

Enables the audio track.

Link copied to clipboard

Enables the text track.

Link copied to clipboard

Enables the video track.

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

Collects the aspect ratio of the current video as a Flow.

Link copied to clipboard
fun Player.getChapterAtPosition(positionMs: Long = currentPosition): Chapter?

Retrieves the Chapter that encompasses the given position in the media playback.

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

Retrieves the Credit that encompasses the given position in the media playback.

Link copied to clipboard
Link copied to clipboard

Returns the chapters for the currently playing media item.

Link copied to clipboard
Link copied to clipboard

Returns the credits for the currently playing media item.

Link copied to clipboard

Collects the timeline's default position, in milliseconds, as a Flow.

Link copied to clipboard

Retrieves a snapshot of the current media items in the player.

Link copied to clipboard
Link copied to clipboard
abstract fun getMediaItemAt(p0: Int): MediaItem
Link copied to clipboard

Returns the current playback speed of the player.

Link copied to clipboard
Link copied to clipboard
fun Player.getUnixTimeMs(positionMs: Long = currentPosition, window: Timeline.Window = Window()): Long

Calculates the unix time corresponding to the given position in the current media item in milliseconds.

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
abstract fun increaseDeviceVolume()
abstract fun increaseDeviceVolume(p0: Int)
Link copied to clipboard
fun Player.isAtLiveEdge(positionMs: Long = currentPosition, window: Timeline.Window = Window()): Boolean

Checks if the current playback position is at the live edge of a live stream.

Link copied to clipboard
abstract fun isCommandAvailable(p0: Int): Boolean
Link copied to clipboard

Collects whether the current media item is a live stream as a Flow.

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

Collects whether the player is playing as a Flow.

Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun prepare()
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: List<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
fun Player.seekToUnixTimeMs(unixTimeMs: Long, window: Timeline.Window = Window())

Seeks the player to the specified unix time in milliseconds within the current media item's window.

Link copied to clipboard

Selects the provided track for playback.

Link copied to clipboard
Link copied to clipboard

Sets the track selection to automatically select the default audio track.

Link copied to clipboard

Sets the track selection to automatically select the default text track.

Link copied to clipboard

Sets the track selection to automatically select the default video track.

Link copied to clipboard
fun Player.setHandleAudioFocus(handleAudioFocus: Boolean)

Sets whether the player should handle audio focus.

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: List<MediaItem>)
abstract fun setMediaItems(p0: List<MediaItem>, p1: Boolean)
abstract fun setMediaItems(p0: List<MediaItem>, p1: Int, p2: Long)
Link copied to clipboard
abstract fun setPlaybackSpeed(@FloatRange(from = 0.0, fromInclusive = false) p0: Float)
Link copied to clipboard

Sets a track selection 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
Link copied to clipboard
abstract fun stop()
Link copied to clipboard
fun Player.tickerWhilePlayingAsFlow(interval: Duration = DefaultUpdateInterval): Flow<Unit>

Emits an event every interval while the Player is playing.

Link copied to clipboard