ReactNativeScreenRecorder is a demo React Native project. It records screen into a video on both iOS and Android. The purpose of this project is to show how to bridge between Javascript and iOS/Android code. It runs on iOS 8+ and Android 6.0+.
##Screenshots:
##Install:
git clone --recursive [email protected]:vinceyuan/ReactRecorder.git
cd ReactRecorder && npm install
##Run:
####Run on iOS:
- Open
ios/ReactRecorder.xcodeproj
with Xcode. - Choose iPhone 6 (8.1) simulator, run.
####Run on Android:
- Open
android/
with Android Studio. - Run the app in an Android 6.0 emulator.
##Notes:
The bridging works on iOS 8+ and Android 5.0+. But I didn't find perfect ways to record screen on iOS and Android. Screen recording on iOS is based on ASScreenRecorder. It does not work well in React Native app. I managed to modify it to let it work on iOS 8. On iOS 9 and 10, sometimes the recorded video does not animate, and sometimes it records only once. Screen recording on Android is based on this post. Though Android 5.0 provides MediaProjection API, it always crashes on my Android 5.0 emulator. It works well on Android 6.0.