cordova-plugin-audioinput icon indicating copy to clipboard operation
cordova-plugin-audioinput copied to clipboard

audioinput.stop() stream to web problem

Open kpwa opened this issue 7 years ago • 2 comments

one i call audioinput.stop() the next streamtoweb audio will just stop working. Issue happens in ios 11 & 12

kpwa avatar Oct 24 '18 01:10 kpwa

Do you have some code showing how to trigger this issue?

edimuj avatar Oct 26 '18 16:10 edimuj

rec() { audioinput._micGainNode = null; let audioCtx = new (window["AudioContext"] || window["webkitAudioContext"])(); audioinput.start({streamToWebAudio : true, audioContext:audioCtx, concatenateMaxChunks: 1, normalize: true}); // Start the capture var dest = audioinput.getAudioContext().createMediaStreamDestination(); // Create the node audioinput.connect(dest); return (dest.stream); }

stop(){ audioinput.disconnect(); audioinput.stop(); }

i call rec function to start. Everything works ok, my stream goes through perfectly. Then i call stop. Then i call rec function again, but no audio is streamed back also no error is displayed either.

Then when i restart the app, and call rec function, it works, then i call stop and call rec function again, same issue re ocurs.

kpwa avatar Oct 26 '18 17:10 kpwa