Package-level declarations
Types
Functions
Plays a file from the app's assets directory. The asset must be stored uncompressed, because a compressed asset has no descriptor and fails at open. The Android build stores common media extensions, such as mp4 and mkv, uncompressed already.
Plays the file at path. Each open reads through its own channel, so two sessions never share a position.
Plays the file at path. Each open opens the file itself and reads it by position, so two sessions never share a position. MediaItem(path) also plays a plain path, through FFmpeg's own file reader. This door is for code that wants every read to pass through Kotlin.
Plays the address a Compose Multiplatform resource has on Android (#457), the file:///android_asset/composeResources/... that Res.getUri returns there, from the app's assets through context. An asset stored uncompressed reads by position, as through ofAsset; one stored compressed reads as a stream that seeks by opening it again, which costs little for a clip an app bundles. Null for any other address, which then plays as it is.
Plays the address a Compose Multiplatform resource has in a packaged desktop app (#457), the jar:file:...!/composeResources/... that Res.getUri returns there, by reading the entry out of the app's jar. The entry seeks, by opening it again when a seek goes back, because it is stored compressed. Null for any other address, which then plays as it is: a file: address through FFmpeg's own file reader, as when Res.getUri runs from the build directory.
Plays a stream. A stream reads forward only, so the player cannot seek in it or switch its video track. Each open reads from the start, so open must return a new stream on every call. The reader closes the stream it got.
Plays what a content provider serves, such as a file from the system picker. Each open asks the provider for a new descriptor and reads it by position, so a reopen never moves a descriptor that someone else holds. A provider that answers with a pipe plays forward only.
Plays a file URL, such as one from a document picker. Each open starts security-scoped access to url, and the reader stops that access when it closes. So a picked file stays readable while the player reads it, and the caller has nothing to release.