npm version npm downloads license
Screen recording for React Native with Android 14+ MediaProjectionConfig support.
Drop-in replacement for react-native-record-screen — 100% backward compatible, with a new startRecordingEntireScreen() method that blocks the "Single app" recording option on Android 14+.
Android 14 introduced a system dialog letting users choose "Single app" recording instead of full screen. This breaks use cases that require capturing the entire screen (security, compliance, screen sharing).
startRecordingEntireScreen() uses MediaProjectionConfig.createConfigForDefaultDisplay() to enforce full-screen recording.
| Original | Extended | |
|---|---|---|
| Basic recording | startRecording() |
startRecording() |
| "Single app" option (Android 14+) | Always shown | Block or allow |
| Force entire screen | Not possible | startRecordingEntireScreen() |
| iOS | ReplayKit | ReplayKit (same) |
| Backward compatible | — | 100% |
- iOS >= 11.0 (Simulator not supported)
- Android: minSdkVersion 26, compileSdkVersion 34
npm install react-native-record-screen-extended
Add permissions to Info.plist:
<key>NSCameraUsageDescription</key> <string>Please allow use of camera</string> <key>NSMicrophoneUsageDescription</key> <string>Please allow use of microphone</string>
Then install pods and add ReplayKit.framework at Link Binary With Libraries.
npx pod-install
Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
import RecordScreen, { RecordingResult } from 'react-native-record-screen-extended'; // Start const res = RecordScreen.startRecording().catch((error) => console.error(error)); if (res === RecordingResult.PermissionError) { // user denied access } // Stop const res = await RecordScreen.stopRecording().catch((error) => console.warn(error)); if (res) { const url = res.result.outputURL; }
// Blocks "Single app" option — forces full screen capture await RecordScreen.startRecordingEntireScreen({ fps: 30, bitrate: 1000000, mic: true, }); // Stop (same as basic) const res = await RecordScreen.stopRecording();
Platform behavior:
- Android 14+ — uses MediaProjectionConfig to block single-app recording
- Android 13 and below — falls back to regular behavior
- iOS — uses regular startRecording() (no single-app option exists on iOS)
RecordScreen.startRecording({ mic: false, // default: true bitrate: 1024000, // default: 236390400 fps: 24, // default: 60 });
RecordScreen.clean();
npm uninstall react-native-record-screennpm install react-native-record-screen-extended- Update imports:
from 'react-native-record-screen'→from 'react-native-record-screen-extended' - Existing code works as-is. Use
startRecordingEntireScreen()where needed.
MIT