ConfigurationInvalid

data class ConfigurationInvalid(val detail: String) : PlaybackError

The player was asked to exist without something it cannot invent, or against a runtime it cannot use, or an item it was asked to open sets one option twice.

Three cases today. A missing backend: Kotlin/Native has no classpath service lookup, so there is no such thing as finding the platform's decoder or its audio device at runtime, and whoever creates the player passes both in. Saying so as a typed error is the alternative to reflection, and it names what to pass rather than failing later with a null.

The second is an FFmpeg runtime that does not match the headers the native layer was compiled against. Nothing about that failure depends on the media: every file fails, the next file will fail too, and retrying is pointless, which is what separates it from SourceUnavailable. The detail carries both version columns for all six libraries and one actionable sentence.

The third is an item that sets one FFmpeg option through a typed field, such as MediaItem.formatHint or MediaItem.demux, and through MediaItem.openOptions as well. The FFmpeg backend refuses it at open, and the detail names the option and the field.

Constructors

Link copied to clipboard
constructor(detail: String)

Properties

Link copied to clipboard
open val cause: Throwable? = null
Link copied to clipboard
Link copied to clipboard
open override val message: String

Functions

Link copied to clipboard
override fun toString(): String

The type and the message, with every URI cut to its file name. Final, so no subclass prints its fields: a data class would print a signed URL whole, and errors are what apps log.