Yokan / rebuild
Course 1 8624561

MediaPlayer.ios.kt

composeApp/src/iosMain/kotlin/eu/friedcutlet/yokan/services/media/player/MediaPlayer.ios.kt

implementation15 lines
1package eu.friedcutlet.yokan.services.media.player23import eu.friedcutlet.yokan.services.logging.AppLogger4import platform.Foundation.NSBundle56actual fun createMediaPlayerController(7    configuration: MediaPlayerConfiguration,8    streamProxy: MediaStreamProxy,9): MediaPlayerController =10    runCatching {11        val mpvPath = NSBundle.mainBundle.privateFrameworksPath?.let { "$it/Mpv.framework/Mpv" }12        createMpvMediaPlayerController(configuration, streamProxy, mapOf("vo" to "libmpv"), mpvPath)13    }14        .onFailure { AppLogger.warn("[player] iOS mpv unavailable; using AVPlayer: ${it.message.orEmpty()}") }15        .getOrElse { createComposeMediaPlayerController(streamProxy) }16

Search chapters, reference and source filenames.