ai / audio-recorder-polyfill

MediaRecorder polyfill to record audio in Edge and Safari

Home Page:https://ai.github.io/audio-recorder-polyfill/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firefox requesting permission

AsyncSan opened this issue · comments

When you run the demo in Firefox, everytime you click on the record button you get asked for recoding permission.

I tried to load the:

navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
        recorder = new MediaRecorder(stream);

Once in the beginning, using reacts componentDidMount, but then the data wont be useable after the second recording.

Any workaround for this?

I understand that it need to be invoked because the getUserMedia() returns a stream object that needs to be passed in .then() but it doesn´t feel right.
In this Demo you are only prompted once (Tested on FF mobile) but the audio isn't recording
https://danielstorey.github.io/WebAudioTrack/index.html

Firefox has a special checkbox “remember this permission”. Seems like it is their security UX choice. And it is good. Users should always know when app record them.

Starting recording on componentDidMount is not a great option since Firefox will show special “recording” icon.

Anyway, this issue is not part of polyfill (it is Firefox UX).

Thanks very much for the clarification.
But what do you think about the solution from: https://danielstorey.github.io/WebAudioTrack/index.html

Here you are only asked once in the beginning. So it seems to be quite possible. Any suggestion?

But what do you think about the solution from

This solution is not good, since even if I clicked on “Stop recording”, Firefox will show me “recording is in the progress” notification overlay. It reduces trust to your website.

ur0sfce

Same in Chrome. Browser tab will continue to show “recording” icon even if I stopped recording.

guctuxm

True, that is a valid argument