doppelgunner / audio-react-recorder

Audio / Voice Recorder for ReactJS using Web Audio API
49 stars 42 forks source link

Not working on mac #11

Open aliabid94 opened 3 years ago

aliabid94 commented 3 years ago

Get TypeError: Cannot read properties of null (reading 'getAudioTracks') Works fine on Windows

image

lxtmohamedfaried commented 2 years ago

I had the same issue and later discovered that is the behavior when the user doesn't allow the site to access the mic. It is still a bug because the recorder seems to recording correctly by the the exception is thrown when you try to stop the recorder element.

My recommendation that you don't display or include the recorder component when the mic access is not allowed.

taylorchance commented 2 years ago

Im having this exact error as well, only on ios Safari. I tried what was recommended by

navigator.mediaDevices.getUserMedia({audio: true}).then(() => { setHasPermissions(true) })

I only display the whole component until there is permissions, but I still get the exact error.