react-native-webrtc provides a comprehensive WebRTC implementation for React Native applications across Android, iOS, and tvOS. The library is currently stable at version 124.0.7 and follows a rapid release cadence, frequently updating to new WebRTC M-releases (e.g., M124). Key features include support for audio/video communication, data channels, and screen capture. A significant differentiator is its exclusive adoption of the Unified Plan as of version 106.0.0, requiring users of older Plan B to migrate or remain on previous releases. It also supports Simulcast since version 111.0.0 with software encode/decode factories enabled by default. While not officially supporting macOS or Windows, it offers a web shim for react-native-web and can be integrated into Expo projects via expo-dev-client and config plugins.
npm install react-native-webrtcVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to obtain local audio/video media, initialize an RTCPeerConnection, and display the local video stream using RTCView, including basic Android permission handling.
Refactor WebRTC signaling and session description handling to comply with Unified Plan specifications. Consult the WebRTC documentation for migration guides.
Developers targeting Android devices with external cameras should verify compatibility or implement alternative camera handling if UVC is critical, potentially by staying on an older version or contributing a new implementation.
Upgrade to version 124.0.5 or newer. If issues persist, ensure your `android/app/build.gradle` `minSdkVersion` is aligned with React Native's recommendations and any specific library requirements.
Update `react-native-webrtc` to version 124.0.3 or later to ensure compatibility with React Native 0.73+ on iOS.
Follow the platform-specific installation guides (Android, iOS) in the documentation to ensure all native modules are correctly linked and permissions are configured. For Expo, use `expo-dev-client` and the `config-plugins/react-native-webrtc` package.
On Android, request `PermissionsAndroid.PERMISSIONS.CAMERA` and `PermissionsAndroid.PERMISSIONS.RECORD_AUDIO`. On iOS, ensure `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` are present in `Info.plist`.
Ensure `import { mediaDevices } from 'react-native-webrtc';` is present. Verify that you have run `npx react-native link` (if applicable) and followed all platform-specific native installation steps.Confirm that you have completed all native installation steps for both Android and iOS, including running `pod install` for iOS and rebuilding your Android project after installing the package.