MediaSource

sealed interface MediaSource(source)

Something to read media from.

Construct one through the companion factories, which are also what a Swift caller uses.

Inheritors

Types

Link copied to clipboard
class Bytes(val bytes: ByteArray, val hint: FormatHint? = null) : MediaSource

Bytes already in memory.

Link copied to clipboard
object Companion
Link copied to clipboard
class Image(val image: ImageSource, val duration: Duration) : MediaSource

A still image held on screen for a fixed length of time.

Link copied to clipboard
class Path(val path: String) : MediaSource

A file on disk.

Link copied to clipboard
class Uri(val uri: String) : MediaSource

A platform-native content reference.