javascript - <audio> getUserMedia not producing any sound from microphone -
i have code accesses microphone , reproduces sound created microphone speakers. seems it's not working. accesses microphone, , red circle blinks in favicon, seems it's not producing sound. i'm not sure think it's problem tag. think error here?
try { navigator.getmedia = ( navigator.getusermedia || navigator.webkitgetusermedia || navigator.mozgetusermedia ||navigator.msgetusermedia); navigator.getmedia ({ audio: true }, function(stream) { var audio = document.getelementbyid('audio'); var streamer = window.url.createobjecturl(stream); audio.src = streamer; }, function(err) { // no permissions } ); } catch(e) { alert('error'); }
above script, audio tag lies.
<audio src="" id="audio" controls="controls" autoplay>sad twinkies not have audio</audio>
so think problem here?
Comments
Post a Comment