DefaultMediaManager

Default implementation of BaseMediaManager

Parameters

mediaSurfaceProvider

a MediaSurfaceProvider that will automatically call renderVideoOnSurface for the latest MediaSurface

coroutineContext

the CoroutineContext on which the media will be managed

context

the Context to access local resources

Default implementation of BaseMediaManager

Default implementation of BaseMediaManager

Parameters

mediaSurfaceProvider

a MediaSurfaceProvider that will automatically call renderVideoOnSurface for the latest MediaSurface

coroutineContext

the CoroutineContext on which the media will be managed

settings

the Settings used to configure the Media Manager

Default implementation of BaseMediaManager

Parameters

mediaSurfaceProvider

a MediaSurfaceProvider that will automatically call renderVideoOnSurface for the latest MediaSurface

coroutineContext

the CoroutineContext on which the media will be managed

settings

the Settings used to configure the Media Manager

Default implementation of BaseMediaManager for the JS family, backed by an HTMLMediaElement.

Constructors

Link copied to clipboard
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, coroutineContext: CoroutineContext, context: Context)
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, settings: DefaultMediaManager.Settings, coroutineContext: CoroutineContext)
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, settings: DefaultMediaManager.Settings, coroutineContext: CoroutineContext)

Types

Link copied to clipboard
Link copied to clipboard
data class Settings(val playInBackground: Boolean = false, val playAfterDeviceUnavailable: Boolean = false)

Settings used for configuring a DefaultMediaManager

data class Settings(val playInBackground: Boolean = false, val playAfterDeviceUnavailable: Boolean = false)

Settings used for configuring a DefaultMediaManager

Properties

coroutineContext
Link copied to clipboard
Link copied to clipboard
actual open override val currentVolume: Flow<Float>

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.

expect open override val currentVolume: Flow<Float>

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.

actual open override val currentVolume: Flow<Float>

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.

actual open override val currentVolume: Flow<Float>

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.

actual open override val currentVolume: Flow<Float>

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.

Link copied to clipboard
open override val events: Flow<MediaManager.Event>

A Flow of all the Event detected by the media manager

open override val events: Flow<MediaManager.Event>

A Flow of all the Event detected by the media manager

open override val events: Flow<MediaManager.Event>

A Flow of all the Event detected by the media manager

open override val events: Flow<MediaManager.Event>

A Flow of all the Event detected by the media manager

open override val events: Flow<MediaManager.Event>

A Flow of all the Event detected by the media manager

Functions

Link copied to clipboard
open override fun close()

Releases all resources associated with the media manager. This method should be called when done with the media manager. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded

open override fun close()

Releases all resources associated with the media manager. This method should be called when done with the media manager. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded

open override fun close()

Releases all resources associated with the media manager. This method should be called when done with the media manager. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded

open override fun close()

Releases all resources associated with the media manager. This method should be called when done with the media manager. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded

open override fun close()

Releases all resources associated with the media manager. This method should be called when done with the media manager. After calling this playback is disabled. Any subsequent calls will result in a PlaybackError.PlaybackHasEnded

Link copied to clipboard
suspend override fun createPlayableMedia(source: MediaSource): PlayableMedia?

Attempts to create a PlayableMedia for a given MediaSource

suspend override fun createPlayableMedia(source: MediaSource): PlayableMedia?

Attempts to create a PlayableMedia for a given MediaSource

suspend override fun createPlayableMedia(source: MediaSource): PlayableMedia?

Attempts to create a PlayableMedia for a given MediaSource

suspend override fun createPlayableMedia(source: MediaSource): PlayableMedia?

Attempts to create a PlayableMedia for a given MediaSource

suspend override fun createPlayableMedia(source: MediaSource): PlayableMedia?

Attempts to create a PlayableMedia for a given MediaSource

Link copied to clipboard
actual open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

expect open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

actual open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

actual open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

actual open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

Link copied to clipboard
actual open override fun pause()

Pauses playback

expect open override fun pause()

Pauses playback

actual open override fun pause()

Pauses playback

actual open override fun pause()

Pauses playback

actual open override fun pause()

Pauses playback

Link copied to clipboard
actual open override fun play(rate: Float)

Starts playback at a given rate

expect open override fun play(rate: Float)

Starts playback at a given rate

actual open override fun play(rate: Float)

Starts playback at a given rate

actual open override fun play(rate: Float)

Starts playback at a given rate

actual open override fun play(rate: Float)

Starts playback at a given rate

Link copied to clipboard
actual open suspend override fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

expect open suspend override fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

actual open suspend override fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

actual open suspend override fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

actual open suspend override fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

Link copied to clipboard
override fun reset()

Resets the media manager to an uninitialized state. After calling this initialize will have to be called again.

override fun reset()

Resets the media manager to an uninitialized state. After calling this initialize will have to be called again.

override fun reset()

Resets the media manager to an uninitialized state. After calling this initialize will have to be called again.

override fun reset()

Resets the media manager to an uninitialized state. After calling this initialize will have to be called again.

override fun reset()

Resets the media manager to an uninitialized state. After calling this initialize will have to be called again.

Link copied to clipboard
suspend override fun seekTo(duration: Duration): Boolean

Seeks to a specified time position. Will suspend until seek has completed

suspend override fun seekTo(duration: Duration): Boolean

Seeks to a specified time position. Will suspend until seek has completed

suspend override fun seekTo(duration: Duration): Boolean

Seeks to a specified time position. Will suspend until seek has completed

suspend override fun seekTo(duration: Duration): Boolean

Seeks to a specified time position. Will suspend until seek has completed

suspend override fun seekTo(duration: Duration): Boolean

Seeks to a specified time position. Will suspend until seek has completed

Link copied to clipboard
actual open override fun stop()

Stops playback

expect open override fun stop()

Stops playback

actual open override fun stop()

Stops playback

actual open override fun stop()

Stops playback

actual open override fun stop()

Stops playback

Link copied to clipboard
actual open suspend override fun updateVolume(volume: Float)

Updates the currentVolume

expect open suspend override fun updateVolume(volume: Float)

Updates the currentVolume

actual open suspend override fun updateVolume(volume: Float)

Updates the currentVolume

actual open suspend override fun updateVolume(volume: Float)

Updates the currentVolume

actual open suspend override fun updateVolume(volume: Float)

Updates the currentVolume