I am using recorder.js and Recordmp3.js for recording audio through microphone.
It's working fine in chrome browser but not in Firefox(Latest version as well).
When I hit my web app on the Firefox browser, It asks me to share microphone but after few seconds It gets disappeared. So because of that recording feature not be able to record anything on Firefox.
I am sharing on working example developed using Recordmp3.js and It's not working in Firefox.
Is this a known issue?
I was correct, the problem was audioStream element to garbage collected, I downloaded the code from github and modified
this:
var audio_context;
var recorder;
function startUserMedia(stream) {
var input = audio_context.createMediaStreamSource(stream);
into
var audio_context;
var recorder;
var localStream; // line added by me
function startUserMedia(stream) {
localStream = stream; // line added by me
var input = audio_context.createMediaStreamSource(stream);
hence making sure that the stream
is not garbage collected.
P.S :
things to note,
1 : MP3 encoding/decoding technology may be governed by MP3 patents in some countries. For commercial purposes, I would advice you to go for vorbis/ogg
way( also I think the quality of mp3 after conversion from wav is bad).
2 : I found another problem of extra 50% of silence in the recordings, but the solution for that is already available online if i am correct.
Edit: I have added a demo for this in github