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?
True, that is a valid argument