fix(ios): enable PiP subtitles

This commit is contained in:
edde746
2026-05-25 04:47:55 +02:00
parent 5fa8326341
commit 6b147e2053
5 changed files with 22 additions and 4 deletions
@@ -188,6 +188,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginS
guard let playerCore = playerCore else { return nil }
guard let pip = ensurePipController() else { return nil }
pendingInlineRestoreAfterPip = false
playerCore.setPipSubtitleCompositing(true)
playerCore.isPipStarting = true
pip.syncTimebase(currentTime: playerCore.timePos, isPlaying: !playerCore.isPaused)
pip.invalidatePlaybackState()
@@ -232,6 +233,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginS
/// Unified cleanup for all PiP exit paths
private func cleanupPip(notify: Bool, pause: Bool = false) {
playerCore?.setPipSubtitleCompositing(false)
playerCore?.isPipStarting = false
playerCore?.isPipActive = false
isManualPipRequest = false