This example project illustrates an issue with react-native-video & react-native-screens on iOS 26, where cancelling out video player dismissal results in the screen becoming non-interactive.
On iOS 26, react-native-screens disables window interactions on RNSScreen.willMoveToWindow. This is triggered when we start to dismiss react-native-video's player, because that dismissal affects view hierarchy. But RNSScreen's transitionCoordinator is not aware of that gesture, and cannot re-enable interactions when we cancel. The workaround on our end is the following react-native-video patch:
diff --git a/ios/Video/RCTVideoPlayerViewController.swift b/ios/Video/RCTVideoPlayerViewController.swift
index 11227b76ef09aee76ae264d11b078230a9367f47..eebfd0ade0c426570847108e2bf41ba735112922 100644
--- a/ios/Video/RCTVideoPlayerViewController.swift
+++ b/ios/Video/RCTVideoPlayerViewController.swift
@@ -15,6 +15,20 @@ class RCTVideoPlayerViewController: AVPlayerViewController {
return false
}
+ override func viewWillDisappear(_ animated: Bool) {
+ super.viewWillDisappear(animated)
+
+ if #available(iOS 26, *) {
+ if let coordinator = transitionCoordinator, coordinator.isInteractive {
+ coordinator.notifyWhenInteractionChanges { context in
+ if context.isCancelled {
+ self.view.window?.isUserInteractionEnabled = true
+ }
+ }
+ }
+ }
+ }
+
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
2 changes: 1 addition & 1 deletion2
package.json