Answer the question
In order to leave comments, you need to log in
Microphone in Web Audio API
Good afternoon! There is an html page and a js script connected to it that implements the microphone:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="tn.js"></script>
</head>
<body>
<script>
window.onload = navigator.getUserMedia({audio: true}, gotStream);
</script>
</body>
</html>
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
function gotStream (stream) {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContext();
var mediaStreamSource = audioContext.createMediaStreamSource(stream);
mediaStreamSource.connect(audioContext.destination);
}
navigator.getUserMedia({audio: true}, gotStream)
, then everything works?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question