android-components / mozilla.components.concept.engine.media / Media

Media

abstract class Media : Observable<Observer> (source)

Value type that represents a media element that is present on the currently displayed page in a session.

Types

Name Summary
Controller interface Controller
Controller for controlling playback of a media element.
Metadata data class Metadata
Metadata associated with Media.
Observer interface Observer
Interface to be implemented by classes that want to observe a media element.
PlaybackState enum class PlaybackState
State enum class State
A simplified media state deprived from the playbackState events.

Constructors

Name Summary
<init> Media(delegate: Observable<Observer> = ObserverRegistry())
Value type that represents a media element that is present on the currently displayed page in a session.

Properties

Name Summary
controller abstract val controller: Controller
The Controller for controlling playback of this media element.
metadata abstract val metadata: Metadata
The Metadata
playbackState var playbackState: PlaybackState
The current PlaybackState of this media element.
state var state: State
The current simplified State of this media element (derived from playbackState events).

Functions

Name Summary
toString open fun toString(): String

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.