Microphone Check

In this example below you will see how to do a Microphone Check with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by ultraloveninja, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright ultraloveninja ©
  • HTML
  • CSS
  • JavaScript
    

/*Downloaded from https://www.codeseek.co/ultraloveninja/microphone-check-qYppKK */
    


/*Downloaded from https://www.codeseek.co/ultraloveninja/microphone-check-qYppKK */
    function micOn(stream) {
  console.log("mic is on");
}
function micOff(error) {
  console.log(error);
  if ((error = "NOT_SUPPORTED_ERR")) {
    console.log("NO MIC");
  }
}
navigator.getUserMedia({ audio: true }, micOn, micOff);


Comments