GithubHelp home page GithubHelp logo

yutasuzuki / react-native-record-screen Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 38.0 1.47 MB

react-native-record-screen

License: MIT License

Kotlin 21.44% JavaScript 4.69% TypeScript 22.01% Swift 0.15% Ruby 8.80% C 0.23% Objective-C 7.46% Objective-C++ 35.22%

react-native-record-screen's People

Contributors

345ml avatar eliaslecomte avatar robrechtme avatar seachaos avatar yutasuzuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-record-screen's Issues

[feature request] Record only a selection of component inside an app instead of fullscreen

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 !

Android build is failing

Can you build on android?

I have this error:
Failed to resolve: com.github.HBiSoft:HBRecorder:0.1.13

An unexpected error for video streaming with recording

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)

Permission dialog

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!

Pausing/Resuming Recording

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?

On iOS when recording on landscape the output video is in portrait mode

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

App Permissions minibug

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 ;)

Android Release build recording not working

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

Recording Not Working

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

ios recording video not show

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.

background Recording not working on iOS

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

Not Working on both IOS/Android

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

Recording Prompt

Hi is there a way to detect the user's action? (record, record without mic, cancel)

Null is not an object

Possible Unhandled Promise Rejection (id: 0):
TypeError: null is not an object (evaluating '_reactNativeReplaykit.default.stopRecording')

In iOS devices only the application screen gets record.

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.

Records bottom System Navigation bar - Android

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.

Suggestion [Add options][Android]

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);```

Unreachable iOS video path

Hi. I can't find video's path. Could you please save the video to a different location Photo Library?

Undefined is not an object

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.

Subscribing to the stop recording event from notification.

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.

Android app crashes

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

Screen.Recording.2022-03-14.at.4.51.43.PM.mov

iOS recording corrupted when going to background

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?

Cropping

What was the reason to remove cropping?
It looks like basic useful feature.

startRecording() always returns started

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

permission

recording not available on the device

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)

The sound is not working

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

RecordScreen.stopRecording() not terminating

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

IOS: Video sound Became low when microphone is in on state.

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.

Permissions not saving

Hello there. Permissions aren't saving for me. Each time I close the app and reopen, it prompts me with the message at the bottom. I am building with EAS in a bare workflow for expo.

info.plist
image

Message that is displaying
IMG_0170

Automatically stop on Android

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");
}

HBiSoft/HBRecorder#13 (comment)

Record Screen on Specific Part

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

Is it possible to record the screen on iOS outside of the app?

On Android it is working but it throws an error when trying it on iOS.
Steps:

  1. Start recording
  2. Close the app to the background
  3. Return to the app and stop recording

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]

video file

I did not find my recording video in real mobile emulator, could you please help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.