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.
Inherited properties
Available session commands
The SessionToken of the connected session, or null
if it is not connected.
Returns the blocked time ranges for the currently playing media item.
Returns the chapters for the currently playing media item.
Returns the credits for the currently playing media item.
The current PillarboxMetadata for the currently playing media item.
Custom layout
Is connected
Whether setImageOutput is supported.
Whether the metrics are available. Even if this is true
, getCurrentMetrics may return null
.
Whether setSeekParameters is supported.
Session activity
Session extras
Controls whether smooth seeking behavior is enabled.
Controls whether media item tracking is enabled.
Functions
Get children for the parentId
Get item
Get library root
Returns the search result from the library service.
Requests a search from the library service.
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.
Unsubscribes from a parent id for changes to its children, which was previously subscribed by subscribe.
Inherited 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 playback metrics as a Flow.
Collects the current Pillarbox 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 BlockedTimeRange that encompasses the given position in the media playback.
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 Player.getChapterAtPosition as a Flow.
Collects the Player.getCreditAtPosition as a Flow.
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.
Get current metrics
Collects the current tracks as a Flow.
Collects the device info 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.
Collects the current volume as a Flow.
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.
Collects the muted state of the device 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.
Collects the repeat mode 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 the ImageOutput where rendered images will be forwarded. This method does nothing if the player doesn't render anything.
Does nothing if isSeekParametersAvailable is false
.
Sets a track selection override.
Collects whether the shuffle mode is enabled as a Flow.
Collects the video size as a Flow.