I am trying to record audio and upload it to server using javascript.I am using Recorder js by Matt Diamond.But the issue is file getting generated is of 0 mins. When debugged through firebug console found out the audiocontext property was suspended. When googled found out for recording the audiocontext's state should be in running state. Don't know exactly if the issue is because of state or am I missing on something. Wanted to know what causes the state of audiocontext to be in suspended mode. If I try on other browsers the state is running and file is getting generated. But my restriction is I want to use firefox for my application
Firefox version: 42.0
Below is the code
if(audioRecorder)
{
audioRecorder.clear();
audioRecorder.record();
setTimeout(stopRecorder,9000); // 9 secs
}
function stopRecorder()
{
if(audioRecorder)
{
audioRecorder.stop();
audioRecorder.exportWAV(function(blob){
alert("Blob size : "+blob.size);
// code for sending the blob to server
});
}
}
when debugged the above code in firebug audiocontext was suspended.
Thanks in advance