currently I'm working on my bachelor thesis that is based on another student's work. He has implemented an acoustic communication between 2 PCs on browser level using the Web Audio API. I have to port his code on mobile devices using PhoneGap. The transmitting code works fine, so here is nothing to do. But the receiver doesn't even start. I think this is because PhoneGap doesn't allow/support live audio input (based on my latest google research).
I've just found out that the application fails at
navigator.getUserMedia( {audio:true},
function(stream) {
boom('Live stream is being recieved!!!');
//Wrap the stream and send it to analyser for fft analysis
window.input = audio_context.createMediaStreamSource(stream);
}, function(err) {boom('No live audio input ' + err);});
The question: is there any solution (plugin) to get the live audio input? I'm just looking for the right hint ;-)
So I have found out that there's a plugin called audioCapture (http://plugins.cordova.io/#/package/org.chromium.audiocapture) provided by Chrome Apps on Mobile Using Apache Cordova. This plugin allows the user to use the getUserMedia API. I've followed the steps on https://developer.chrome.com/apps/chrome_apps_on_mobile to create my application with the receiver's logic. Also I've added the permission to the manifest.json file. The code above runs fine but it doesn't recognize any audio input.
Does someone have an idea what the problem could be?