PillarboxMediaBrowser
PillarboxMediaBrowser extends PillarboxMediaController but connects to a PillarboxMediaLibrarySession from a MediaLibraryService.
See also
Types
Builder for PillarboxMediaBrowser.
A listener for events and incoming commands from PillarboxMediaLibrarySession.
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 children for the parentId
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 item
Get library root
Get playback speed
Playback speed Player.getPlaybackSpeed as Flow.
Returns the search result from the library service.
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.
Requests a search from the library service.
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.
Subscribes to a parent id for changes to its children. When there's a change, PillarboxMediaBrowser.Listener.onChildrenChanged will be called with the MediaLibraryService.LibraryParams. You may call PillarboxMediaBrowser.getChildren to get the children.
Ticker emits event every interval when Player.isPlaying is true. Emit a value once at least once.
Unsubscribes from a parent id for changes to its children, which was previously subscribed by subscribe.
Get video size as flow Player.getVideoSize