Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the codegen configuration for the React Native Video component to properly support the New Architecture by renaming the component from VideoView to RNCVideoView and updating related configuration. This ensures the component is properly registered in the third-party components provider instead of falling back to the Interop Layer.
Key changes include:
- Renaming the native component from
VideoViewtoRNCVideoViewacross all platforms - Updating codegen configuration to include proper component provider mapping for iOS
- Adding component descriptors for Android New Architecture support
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| VideoViewNativeComponent.ts | Updates the codegenNativeComponent call to use 'RNCVideoView' name |
| react-native.config.js | Adds componentDescriptors configuration for Android |
| package.json | Updates codegenConfig with new component name and iOS component provider mapping |
| iOS files | Renames classes and interfaces from VideoView to RCTVideoViewComponentView |
| Android files | Updates class names and constants to use RNCVideoView prefix |
| android/build.gradle | Updates libraryName in React configuration |
Comments suppressed due to low confidence (1)
packages/react-native-video/ios/view/fabric/RCTVideoViewComponentView.mm:84
- The function name VideoViewCls should be updated to reflect the new component name, such as RNCVideoViewCls, to maintain consistency with the renamed component.
Class<RCTComponentViewProtocol> VideoViewCls(void)
|
Hi @KrzysztofMoch 👋 I tried applying these changes in my own setup (React Native 0.80 with New Architecture enabled), but I couldn't get it to work properly — the app still crashes when trying to render the Could you please guide me step-by-step on how to properly test this fix in a fresh or existing app? Thanks in advance for your help! 🙏 |
|
I will merge this and make release, so you should be able to just bump version and test it |
Summary
Fixes codgen config
Before
VideoViewwas not registered inRCTThirdPartyComponentsProvider.thirdPartyComponents, and on New Architecture was treated as “Paper View” (View from Old Architecture) - So it was running using Interop Layer 🥲This should also fixes crashes on React Native 0.80+
Fixes #4600
Test plan
VideoViewto App