MediaSourceFactory

Opens media and produces a packet cursor over it.

The engine never asks a source to decode, to buffer ahead, or to decide anything. A source is a cursor and nothing more, which is what lets an FFmpeg source, a pure-Kotlin MP4 reader, a WebCodecs-fed source and a scripted test fake all sit behind the same interface.

Functions

Link copied to clipboard
abstract suspend fun open(media: MediaItem): PlayerMediaSource

Opens media and returns a cursor at its start. Throws when the media cannot be read.