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
+1 -1
View File
@@ -789,7 +789,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 42dcc3123000361d0be54fbaec981043b77e1e05;
revision = 8da57fe1d3dd82524ea4b2ef6ef8b2d692ada395;
};
};
/* End XCRemoteSwiftPackageReference section */
@@ -40,7 +40,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "42dcc3123000361d0be54fbaec981043b77e1e05"
"revision" : "8da57fe1d3dd82524ea4b2ef6ef8b2d692ada395"
}
},
{
@@ -40,7 +40,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "42dcc3123000361d0be54fbaec981043b77e1e05"
"revision" : "8da57fe1d3dd82524ea4b2ef6ef8b2d692ada395"
}
},
{
@@ -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