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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -