Open VincentLu91 opened 2 years ago
@VincentLu91 did you set fromMic and saveFile to true? Because probably your filePath is null because it doesn't save file that you recorded so you can never play it back.
I'm testing the example code with the following and it is working.
I have youtube producing sound in the background and i am able to replay the sound with the play button.
ScreenAudioRecorder.init({
sampleRate: 16000,
channels: 1,
bitsPerSample: 16,
fileName: "novo.wav",
fromMic: false,
saveFile: true,
audioEmitInterval: 1000,
});
As I know this doesn't work on iOS, or rather iOS part is not implemented, only android.
On Fri, 27 Jan 2023, 01:00 Eric Niemeyer, @.***> wrote:
I'm testing the example code with the following and it is working.
I have youtube producing sound in the background and i am able to replay the sound with the play button.
ScreenAudioRecorder.init({ sampleRate: 16000, channels: 1, bitsPerSample: 16, fileName: "novo.wav", fromMic: false, saveFile: true, audioEmitInterval: 1000, });
— Reply to this email directly, view it on GitHub https://github.com/Nilsantos/react-native-screen-audio-recorder/issues/3#issuecomment-1405831661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AND4LCQOCP6AXNCFCH3INBDWUMFYVANCNFSM5IK6UO6A . You are receiving this because you commented.Message ID: @.*** com>
Exactly, the IOS part is not implemented, I couldn't capture the audio played by the device in IOS. If anyone knows how to do it, please help me.
Another interesting point to share is that some applications do not allow audio capture, so when we try to play it nothing is played
I was researching it, as I know you can't access a module specifically for devices audio record, but you can devices screen record(by opening recording modal from ios system with code) witch also records audio.
On Fri, 27 Jan 2023, 01:38 Danilo Santos, @.***> wrote:
Exactly, the IOS part is not implemented, I couldn't capture the audio played by the device in IOS. If anyone knows how to do it, please help me.
— Reply to this email directly, view it on GitHub https://github.com/Nilsantos/react-native-screen-audio-recorder/issues/3#issuecomment-1405863270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AND4LCSMFY2KSW4AV7A3BVLWUMKIRANCNFSM5IK6UO6A . You are receiving this because you commented.Message ID: @.*** com>
This is related to the previous issue "Tried the library but no device audio gets recorded".
I am trying another angle. I used the same code from https://github.com/Nilsantos/react-native-screen-audio-recorder/blob/master/example/src/App.tsx
but in Javascript rather than Typescript. I hit record but several things happen:
Could someone please advise on the two points I brought up above?
Thanks