DefaultMediaPlayer
A default implementation of MediaPlayer
Parameters
method for creating a BasePlaybackStateRepo to manage the PlaybackState of this player
the CoroutineContext on which to run the media player
Constructors
Constructor that provides a BaseMediaManager to manage media playback
Properties
A Flow of the Controls available for playback
The volume of the audio playback. A value of 0.0
indicates silence; a value of 1.0
(the default) indicates full audio volume for the player instance.
A Flow that provides the Duration of the current PlayableMedia of a MediaPlayer. If no PlayableMedia is loaded this will result in Duration.ZERO.
A Flow of the PlayableMedia for which the player is controlling playback
Functions
Suspends until playback has completed
Releases all resources associated with the media player. This method should be called when done with the media player. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded
Suspends until playback has started.
Loads a MediaSource into a PlayableMedia to control playback for
Forces the MediaPlayer to start playback and suspends until playback has completed
A Flow that polls the playtime of the current PlayableMedia of a MediaPlayer as a Duration. If no PlayableMedia is loaded this will result in Duration.ZERO.
Renders the video component of any initialized PlayableMedia on a MediaSurface
Updates the currentVolume