Skip to content

Working with Microphone

bapquad edited this page Feb 20, 2022 · 3 revisions

[Home] > Working with Microphone

This content we learn how to create and use a microphone in Element5JS API.

Start a microphone session

You can create microphone work session easily like as following example.

let microphone = media5.StartMicrophone((devices, devID) => 
{
  if(devices.length) 
  {
    $("#wrapper").text("Audio Streaming...");
  } 
  else 
  {
    $("#wrapper").text("You don't have any microphone");
  }
});