umbertoghio/react-native-screen-mic-recorder

TypeError: Cannot read property 'stopRecording' of null, js engine: hermes

Closed this issue · 1 comments

Hi @umbertoghio ,
I have installed the library. When I try to import then error occurred "TypeError: Cannot read property 'stopRecording' of null, js engine: hermes". Any Solution how to solve this error.
Screenshot:
error

Thanks,
Ali

Hello Ali,

please check the example in the main page, and also the example folder in this repo.

You need to import ScreenRecorder from 'react-native-screen-mic-recorder', not from NativeModules.
The object have attached the necessary methods, but needs to be used from the class, i.e. ScreenRecorder.startRecording as it uses some stuff in the main class.

Hope it helps