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
Smooth seeking enabled
Enable or disable MediaItem tracking
Functions
Available commands Player.getAvailableCommands as Flow.
Current buffered percentage as flow Player.getBufferedPercentage
Current media metadata as flow Player.getCurrentMediaItem
Current media metadata as flow Player.getMediaMetadata
Current position of the player updates every updateInterval when it is playing. Send current position once if not playing.
Current position percent
Disable the audio track.
Disable the text track.
Disable the video track.
Duration Player.getDuration as Flow.
Enable the audio track.
Enable the text track.
Enable the video track.
Get aspect ratio of the current video as Flow.
Get the chapter at position.
Get the credit at position.
Get current media item index as flow Player.getCurrentMediaItemIndex
Get a snapshot of the current media items
Get current media items as flow Player.getCurrentMediaItems
Get current tracks as flow Player.getCurrentTracks
Get playback speed
Playback speed Player.getPlaybackSpeed as Flow.
Get track selection parameters as flow Player.getTrackSelectionParameters
Is at live edge
Return if the playback speed is possible at position. Always return true for none live content or if Player.getCurrentTimeline is empty.
Is playing Player.isPlaying as Flow.
Media item count Player.getMediaItemCount as Flow.
Playback state Player.getPlaybackState as flow.
PlayerError Player.getPlayerError as Flow.
Play when ready as flow Player.getPlayWhenReady
Run the task in the same thread as Player.getApplicationLooper if it is necessary.
Select the provided track.
Restore the default audio track.
Restore the default text track.
Restore the default video track.
Handle audio focus with the currently set AudioAttributes.
Set track override.
Shuffle mode enabled Player.getShuffleModeEnabled as Flow.
Ticker emits event every interval when Player.isPlaying is true. Emit a value once at least once.
Get video size as flow Player.getVideoSize