From 2ce810c191bea6a2c558a610825307388e5277f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FORTIN?= <38886040+topiga@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:44:30 +0200 Subject: [PATCH] fix(player/ios): Disable subtitles embedding for iOS simulator (#1544) --- modules/mpv-player/ios/MPVLayerRenderer.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/mpv-player/ios/MPVLayerRenderer.swift b/modules/mpv-player/ios/MPVLayerRenderer.swift index 9cb5540c..e6686a81 100644 --- a/modules/mpv-player/ios/MPVLayerRenderer.swift +++ b/modules/mpv-player/ios/MPVLayerRenderer.swift @@ -171,7 +171,11 @@ final class MPVLayerRenderer { // Enable composite OSD mode - renders subtitles directly onto video frames using GPU // This is better for PiP as subtitles are baked into the video // NOTE: Must be set BEFORE the #if targetEnvironment check or tvOS will freeze on player exit + #if targetEnvironment(simulator) + checkError(mpv_set_option_string(handle, "avfoundation-composite-osd", "no")) + #else checkError(mpv_set_option_string(handle, "avfoundation-composite-osd", "yes")) + #endif // Hardware decoding with VideoToolbox // On simulator, use software decoding since VideoToolbox is not available