MediaTaskPanel

@IviExperimental(reasons = [])
abstract class MediaTaskPanel(val mediaFrontendContext: MediaFrontendContext, val sourceId: SourceId?, initialMediaItem: IviMediaItem?) : TaskPanel

Base panel type for media-related Frontends.

This type of TaskPanel contains a MediaFrontendContext to hold relevant data for media.

Media task panels may be tied to a certain source, for example to browse its content, or not, such as a generic media settings panel. When a media task panel is made to operate on or with a media source, it will have a non-null sourceId, and null otherwise.

mutableMediaItem can be used to store additional state by adding Bundle fields to it, since the framework will re-create panels with the same mutableMediaItem; for example, to keep track of the activation state of a feature when closing and reopening the stock media frontend.

Note: The mediaItem is used by the stock media frontend to display navigation breadcrumbs.

Inheritors

Constructors

Link copied to clipboard
constructor(mediaFrontendContext: MediaFrontendContext, sourceId: SourceId?, initialMediaItem: IviMediaItem?)

Properties

Link copied to clipboard
open val mediaErrors: Flow<MediaError>

Communicates errors from this MediaTaskPanel to the media application (i.e., frontend).

Link copied to clipboard

Context in which the panel is to be opened. Most decisions should be taken using this state, such as using the panel mapping or the stack to decide which kind of panel to open next.

Link copied to clipboard

The media item that this panel is showing.

Link copied to clipboard
open val sourceId: SourceId?

Source ID tied to this panel.

Inherited properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: Long
Link copied to clipboard
Link copied to clipboard
open override val lifecycle: Lifecycle
Link copied to clipboard
open override val requestsRemoval: LiveData<Boolean>
Link copied to clipboard
val tag: String

Inherited functions

Link copied to clipboard
Link copied to clipboard
override fun dismiss()
Link copied to clipboard
Link copied to clipboard
operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getPanelContext(iviFragmentId: IviFragmentId): NavigablePanelStackContext
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
open override fun onAddedToFrontend()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String