From d7563cfd93ea131beeeffe33d4ece68f405fc23b Mon Sep 17 00:00:00 2001 From: Loewy Date: Mon, 3 Aug 2026 23:30:41 -0700 Subject: [PATCH] Fix video rendering with React Native 0.86 Fold the mobile repository's react-native-video patch into the maintained fork. Avoid the bridgeless RCTBridge.current() trap, preserve the TypeScript install build, and use the supported absolute-fill style so legacy-interoperability video views receive their layout. --- ios/Video/RCTVideoManager.swift | 8 +++++++- package.json | 3 +++ src/Video.tsx | 4 ++-- tsconfig.build.json | 3 +-- tsconfig.json | 4 ++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ios/Video/RCTVideoManager.swift b/ios/Video/RCTVideoManager.swift index dbe83ba0..b5c5f491 100644 --- a/ios/Video/RCTVideoManager.swift +++ b/ios/Video/RCTVideoManager.swift @@ -4,7 +4,13 @@ import React @objc(RCTVideoManager) class RCTVideoManager: RCTViewManager { override func view() -> UIView { - return RCTVideo(eventDispatcher: (RCTBridge.current().eventDispatcher() as! RCTEventDispatcher)) + // `RCTBridge.current()` returns nil under bridgeless (New Architecture), and it + // is nonnull-annotated, so Swift emits an unconditional nil-check trap around + // the call -- optional chaining does not avoid it. Every