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

Default implementation of BaseMediaManager

actual class 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

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

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

Constructors

Link copied to clipboard
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, coroutineContext: CoroutineContext)
constructor(mediaSurfaceProvider: <Error class: unknown class>?, settings: DefaultMediaManager.Settings, coroutineContext: <Error class: unknown class>)
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, coroutineContext: CoroutineContext)
constructor(mediaSurfaceProvider: MediaSurfaceProvider?, coroutineContext: CoroutineContext)

Types

Link copied to clipboard

Builder for creating a DefaultMediaManager

Link copied to clipboard
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
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.

abstract 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.

open val currentVolume: <Error class: unknown class><Float>
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.

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

Functions

Link copied to clipboard
open fun cleanUp()
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

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

Link copied to clipboard
open fun handleCreatePlayableMedia(source: MediaSource): <Error class: unknown class>
Link copied to clipboard
open fun handleReset()
Link copied to clipboard
open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

abstract fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

open fun initialize(playableMedia: <Error class: unknown class>)
open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

open override fun initialize(playableMedia: PlayableMedia)

Initializes to manage for a given PlayableMedia

Link copied to clipboard
open override fun pause()

Pauses playback

abstract fun pause()

Pauses playback

open fun pause(): <Error class: unknown class>
open override fun pause()

Pauses playback

open override fun pause()

Pauses playback

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

Starts playback at a given rate

abstract fun play(rate: Float)

Starts playback at a given rate

open fun play(rate: Float)
open override fun play(rate: Float)

Starts playback at a given rate

open override fun play(rate: Float)

Starts playback at a given rate

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

Renders the video component of any initialized PlayableMedia on a MediaSurface

abstract suspend fun renderVideoOnSurface(surface: MediaSurface?)

Renders the video component of any initialized PlayableMedia on a MediaSurface

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

Renders the video component of any initialized PlayableMedia on a MediaSurface

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.

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

Link copied to clipboard
open fun startSeek(duration: <Error class: unknown class>): <Error class: unknown class>
Link copied to clipboard
open override fun stop()

Stops playback

abstract fun stop()

Stops playback

open fun stop()
open override fun stop()

Stops playback

open override fun stop()

Stops playback

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

Updates the currentVolume

abstract suspend fun updateVolume(volume: Float)

Updates the currentVolume

open suspend fun updateVolume(volume: Float)
open suspend override fun updateVolume(volume: Float)

Updates the currentVolume

open suspend override fun updateVolume(volume: Float)

Updates the currentVolume