Yokan / rebuild
Course 1 8624561

ExternalPlayer.kt

composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/services/media/player/ExternalPlayer.kt

implementation19 lines
1package eu.friedcutlet.yokan.services.media.player23/** A launchable external player; [id] is what the preference stores. */4data class ExternalPlayerChoice(val id: String, val label: String)56/** External players this device can hand streams to; empty where apps cannot be launched (web). */7expect fun externalPlayerChoices(): List<ExternalPlayerChoice>89/**10 * Hand a video stream to an external media player (mpv / VLC / MX Player / etc.). A blank11 * [playerId] keeps the platform's default handler order; otherwise only that player is tried.12 *13 * Callers should already have proxied the URL if it needs request headers;14 * platform actuals are free to ignore [headers] when the OS handler doesn't15 * support per-request headers.16 *17 * Returns true if a launcher was found and dispatched, false otherwise.18 */19expect fun launchExternalPlayer(url: String, headers: Map<String, String> = emptyMap(), playerId: String = ""): Boolean20

Search chapters, reference and source filenames.