yutasuzuki / react-native-record-screen Goto Github PK
View Code? Open in Web Editor NEWreact-native-record-screen
License: MIT License
react-native-record-screen
License: MIT License
Hi !
Thank you very much for this component, very useful !
Do you think it's possible to do a recorder that only select a part of component in a RN app ?
Like :
<App>
<Header/>
<Recorder>
<ComponentsToRecord/>
</Recorder>
</App>
To avoid having some component showing on a screen record.
It's out of curiosity, and i can help if needed but i have no idea how to do that.
Have a good day !
Can you build on android?
I have this error:
Failed to resolve: com.github.HBiSoft:HBRecorder:0.1.13
Package version: 'com.github.HBiSoft:HBRecorder:0.1.13'
iOS platform is no problem
but Android platform has faced a crush with Android 8, but the error will be disappeared above Android 8 (e.g., test ok on 10).
The error log shows as follows, please give some advice. Thanks in advance.
2022-02-17 11:13:32.190 21089-21320/com.rebleeding_monitoring_app W/IMediaDeathNotifier: media server died
2022-02-17 11:13:32.191 21089-21089/com.rebleeding_monitoring_app I/System.out: HBRecorderOnComplete
2022-02-17 11:13:32.191 21089-21320/com.rebleeding_monitoring_app E/MediaPlayerNative: error (100, 0)
2022-02-17 11:13:32.192 21089-21089/com.rebleeding_monitoring_app D/AndroidRuntime: Shutting down VM
2022-02-17 11:13:32.197 21089-21089/com.rebleeding_monitoring_app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.rebleeding_monitoring_app, PID: 21089
kotlin.KotlinNullPointerException
at com.reactnativerecordscreen.RecordScreenModule.HBRecorderOnComplete(RecordScreenModule.kt:143)
at com.hbisoft.hbrecorder.HBRecorder.callback(HBRecorder.java:340)
at com.hbisoft.hbrecorder.FileObserver$1.run(FileObserver.java:73)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:6572)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Hello,
Thank you for your hard work! I feel silly asking this but can you show me how to change the text of the permission dialog?
This application will capture your screen and you will not have a chance to review it
Thank you!
Hi there, thanks for this great package!
I can see that HBRecorder provides also pausing/resuming functionalities, by any chance this module will be updated with those functionalities any time soon?
Using RNFS i can copy or move from uri on android. But cant move on iOS. Could you help me how to copy or move from uri to photo directory on iOS?
Video doesn't play the picked up audio buffer
Thank you for this library. I want to record the screen while the orientation is in landscape mode, android works great but on iOS the output video is in portrait mode and the aspect ratio is not good. I'm changing the app orientation programmatically on the screen I want to record.
thanks
After installing this lib start recording doesn't working. This is caused because App permissions is off (microphone and storage).
Also when i started app for the first time request for permission doesn't appear. is this a bug or a future :D ?
Thanks ;)
It seems that the granted value will always be true here:
react-native-record-screen/ios/RecordScreen.m
Line 124 in cc2a2ed
But if I denied the access, the error will be captured in here:
react-native-record-screen/ios/RecordScreen.m
Line 168 in cc2a2ed
Hello there @yutasuzuki,
The library is asking the permission for recording everytime when the recording started. When the permission is granted why every time it is asking ?
Is there any workaround for this ?
Hello I have implemented this library which works fine in iOS (debug) and android(debug) but when I create release build it recording only for 5 second and stopped without saving any solution
Hi,
OS Version - iOS 12.2 iPhone 6s
I have installed the package and the pod file
getting the error on Xcode
com.apple.ReplayKit.RPRecordingErrorDomain Code=-5807 "Recording interrupted by multitasking and content resizing"
Error Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5803 "Recording failed to start"
These errors I'm getting if I restart the mobile
Can you please help me to make the recorder work?
Thanks in Advance
after recording video in iOS I have got following URL: /var/mobile/Containers/Data/Application/90BC2373-1486-4D67-84D4-3DCD47A0E428/Downloads/doc_73.mp4. I did not find any way to see this video after saving.
Hi,
Thanks for the library...
this library works fine for android . even after starts recording app records whole screen like app minimize and so on..
We can record internal app recording in iOS but we cannot record like android ....
Any Solution for this.
Thanks
when i start recording on android it automatically stop after sec and video not save on phone memory, and on ios side i got exception when i start recoding "Recording not active".
please help me to fixed this issue
Hi is there a way to detect the user's action? (record, record without mic, cancel)
Possible Unhandled Promise Rejection (id: 0):
TypeError: null is not an object (evaluating '_reactNativeReplaykit.default.stopRecording')
Hello @yutasuzuki I have implemented this module, Its working fine in Android devices. But in iOS devices it records only the application screen. If I send my application to background mode, it supposed to record the home screen but its not recording it.
Please help. Thank you in advance.
Great module! Not a bug but it even records the bottom System Navigation bar in Android. I tried using react-native-system-navigation-bar
to hide the bar. But because of the dialogue box (which prompts to record the screen), the bar reappears. If I try to hide the bar after startRecording(), the bar is being closed/hidden in the 1st one second of the video. How do I add a delay to start the recording? I do not want to use ffmeg to trim the video as it is too slow.
Please add option to set some option such as :
Here is example from GBRecorder >>>
//Frame rate is device dependent
//You can use Camcoderprofile to determine the frame rate
hbRecorder.setVideoFrameRate(int);
//The bitrate is also dependent on the device and the frame rate that is set
hbRecorder.setVideoBitrate(int);```
Hi. I can't find video's path. Could you please save the video to a different location Photo Library?
I am unable to start recording. When I start recording, I get this error :
"undefined is not an object (evaluating '_reactNativeRecordScreen.RecordScreen.StartRecording')"
This happens if I import it as :
import { RecordScreen } from 'react-native-record-screen';
On the other hand if I import it as :
import RecordScreen from 'react-native-record-screen';
I get this error:
"null is not an object (evaluating 'RS.Setup')
Kindly help me resolve this error.
Hi,
When the recording starts, a notification is shown on the notification area - telling Recording Your Screen
, and there is a Stop Recording
option below that.
When this stop recording
is called, my app is not notified about that. Can I subscribe to this event in my app, so that I can save the recording?
Or would you let me know if it is available in the underling library?
Thanks.
Hello @yutasuzuki,
I implemented the recording screen feature in my app. but in android 10 and 11, startRecording and stopRecording nothing works and it creates app crashes.
Here is my build.gradle changes:
buildToolsVersion = "30.0.2" minSdkVersion = 26 compileSdkVersion = 30 targetSdkVersion = 30
Hi 👋
We notices that when the app goes to the background during the recording, the MP4 gets corrupted (cannot be opened).
I am aware that on iOS ReplayKit only allows you to record the app window, but technically it should keep recording the app in the background, no?
Do you have any idea what could be going on?
What was the reason to remove cropping?
It looks like basic useful feature.
RecordScreen.stopRecording() not working
start capture returning null
using iOS 12.4.8
white i try to stop record screen no response return and also not saved on my device.
am sorry for about my english.
please help me
I am using react-native-record-screen to record screen in my APP.
I want two type of rendering according to state of recording permission that means if user grant the recording permission then show video and give option to share that but I he denies then I want on state to be false so that I can provide another option to APP user but the problem is ** the promise startRecording() always returns started for all three option on iOS permission prompt**
I am sharing a ScreenShot of the permission dialogue box there are three options and for all three the response of permission is started and the type is string
Hi @yutasuzuki
I got this package work on android and sometimes on iOS too but most of the time recording is not available on the device. I am not good at iOS development hence I need your help why the recording does not save the file (I don't see any error in the xcode)
Hello, I'm trying on Android to set microphone true but when is setted true, after finishing recording I cannot get the url of the video recorded.
There is not some error.
Hey,
I am trying to implement this in our project. The sound is not working though ( its commented out in /ios/RecordScreen.m ).
I also saw that there is few commits related to Android. How does it look like ?
Thanks
realse build not working keep crashing
I am slightly confused from the documentation - does it say that it uses HBR or that I need to install it myself as a prerequisite?
On Android emulator the recording seems to start, but when I want to stop the recording after 5 seconds, it does not terminate. This is my code:
useEffect(() => {
console.log("TRIGGERED recordingStarted: ", recordingStarted);
if (!recordingStarted) return;
setTimeout(() => {
console.log("TRYING TO STOP RECORDING")
RecordScreen.stopRecording()
.then(res => {
console.log("RECORDING STOPPED");
setRecordingStarted(false);
console.log(JSON.stringify(res))
setResultVideoUrl(res.result.outputUrl);
console.log("TRYING TO NAVIGATE!!!")
navigation.navigate('ReactionResultScreen', { videoUrl: res.result.outputUrl });
})
.catch(res => console.log(res))
}, timeoutInMiliseconds)
}, [recordingStarted])
It prints TRYING TO STOP RECORDING
, but never reaches the line console.log("RECORDING STOPPED");
. Does anyone know why?
All permissions are added to the AndroidManifest and the following permissions are asked and granted:
PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO
I am playing video and taking screen recordings. How can I omit video sound while recording?
RecordScreen.clean()
Android clean cannot delete folders
Hi Team, Thanks for this great module. I tried your module, it works awesome. But, Im facing an audio issue in IOS.
Im playing the expo-av video player and started recording, it ask permission for screen recording and microphone. After I gave the permission video's audio became low. But, It works fine If Im doing only screen recording. Please help us to fix this out.
Hi @yutasuzuki, Thank for create great lib. I run example code on iOS working very well, but Android is automatically stop record screen
My environment:
Android version = 10.0
React Native = 0.63.2
buildToolsVersion = "29.0.2"
minSdkVersion = 26
compileSdkVersion = 29
targetSdkVersion = 29
googlePlayServicesAuthVersion = "17.0.0"
EDIT
Add code below in startRecording
function it is working well
if(doesSupportEncoder("h264")){
hbRecorder!!.setVideoEncoder("H264");
} else{
hbRecorder!!.setVideoEncoder("DEFAULT");
}
Hi, i want to record the some part of screen. in your current release, its haven't working. so please assist me how i do this
On Android it is working but it throws an error when trying it on iOS.
Steps:
Error:
Possible Unhandled Promise Rejection (id: 0):
Error: The operation couldn’t be completed. (Cocoa error -1.)
promiseMethodWrapper@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:2275:45
_handleOnRecording$@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:113849:41
tryCatch@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:28643:23
invoke@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:28816:32
tryCatch@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:28643:23
invoke@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:28716:30
http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:28726:21
tryCallOne@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:3475:16
http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:3576:27
_callTimer@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:30664:17
_callImmediatesPass@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:30703:17
callImmediates@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:30920:33
__callImmediates@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:2769:35
http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:2555:34
__guard@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:2752:15
flushedQueue@http://192.168.100.3:8081/index.bundle?platform=ios&dev=true&minify=false:2554:21
flushedQueue@[native code]
invokeCallbackAndReturnFlushedQueue@[native code]
@yutasuzuki When we start recording a notification to stop recording comes natively. If the user presses that then we can't be able to handle that event. We should be able to get an event and then we could handle that appropriately.
Thanks for such a wonderful package
I did not find my recording video in real mobile emulator, could you please help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.