PillarboxMediaController
Types
Builder for PillarboxMediaController.
A listener for events and incoming commands from PillarboxMediaSession.
Properties
Available session commands
The SessionToken of the connected session, or null
if it is not connected.
Custom layout
Is connected
Session activity
Session extras
Controls whether smooth seeking behavior is enabled.
Controls whether media item tracking is enabled.
Functions
Collects the available commands as a Flow.
Collects the buffered percentage as a Flow.
Collects the current media item as a Flow.
Collects the media metadata as a Flow.
Collects the current position of the player as a Flow.
Returns the current playback position as a percentage of the total duration.
Disables the audio track.
Disables the text track.
Disables the video track.
Enables the audio track.
Enables the text track.
Enables the video track.
Retrieves the Chapter that encompasses the given position in the media playback.
Retrieves the Credit that encompasses the given position in the media playback.
Collects the current chapter as a Flow.
Returns the chapters for the currently playing media item.
Collects the current credit as a Flow.
Returns the credits for the currently playing media item.
Collects the timeline's default position, in milliseconds, as a Flow.
Collects the current media item index as a Flow.
Retrieves a snapshot of the current media items in the player.
Collects the current media items as a Flow.
Collects the current tracks as a Flow.
Returns the current playback speed of the player.
Collects the playback speed as a Flow.
Collects the track selection parameters as a Flow.
Calculates the unix time corresponding to the given position in the current media item in milliseconds.
Checks if the current playback position is at the live edge of a live stream.
Collects whether the current media item is a live stream as a Flow.
Return if the playback speed is possible at position. Always return true for none live content or if Player.getCurrentTimeline is empty.
Collects whether the player is playing as a Flow.
Collects the media item count as a Flow.
Collects the playback state as a Flow.
Collects the playback error as a Flow.
Collects the play when ready state as a Flow.
Run the task in the same thread as Player.getApplicationLooper if it is necessary.
Seeks the player to the specified unix time in milliseconds within the current media item's window.
Selects the provided track for playback.
Sets the track selection to automatically select the default audio track.
Sets the track selection to automatically select the default text track.
Sets the track selection to automatically select the default video track.
Sets whether the player should handle audio focus.
Sets a track selection override.
Collects whether the shuffle mode is enabled as a Flow.
Collects the video size as a Flow.