MediaFrontendNavigation

Interface to navigate within the media Frontend, such as opening MediaTaskPanels and performing custom user flows provided by PolicyProvider.userFlowPolicy.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Clears stack of MediaTaskPanels except for the MediaDashboardPanelBase. This resets the media frontend state to the default location, the source selection screen, discarding any saved browsing position.

Link copied to clipboard

Opens the expanded now playing panel.

Link copied to clipboard
abstract fun openMediaTaskPanel(panel: MediaTaskPanel)

Adds panel to the Frontend. The frontend adds panel to the current panel stack.

Link copied to clipboard
abstract suspend fun openSettings(sourceId: SourceId): UserFlowResult

Performs the custom UserFlowPolicy.settingsUserFlow if provided, otherwise uses the PendingIntent from the SourceId.getSettingsIntent to launch the settings activity. If neither custom user flow nor SourceId.getSettingsIntent are provided, this method returns UserFlowResult.Error.

Link copied to clipboard
abstract suspend fun openSource(sourceInfo: SourceInfo, loginStateChangeTimeout: Duration = LOGIN_STATE_CHANGE_TIMEOUT): UserFlowResult

Opens a media source. This is used when clicking the source at the source selection panel. If a source requires a login, this method performs the login user flow and opens the source in the case of success.