Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Microphone not available in firefox

I'm trying to check permission of microphone and then start recording using this code, the following code is working on chrome but not working on firefox. It says microphone not available

  navigator.permissions.query(
        { name: 'microphone' }
    ).then(permissionStatus => {
        console.log(permissionStatus.state); // granted, denied, prompt
        if(permissionStatus.state != 'granted')
        {  
          alert('Please allow your microphone');
        }
        else
        {
          this.startRecording();
  
        }
        let self=this;
        permissionStatus.onchange = function(){
          if(this.state!='granted')
          {
          }
          else
          {
            self.mic_permission=true;
          }
          console.log("Permission changed to " + this.state);
        } 
    }).catch((error) => {
      //console.log('Got error :', error);
  });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The Permissions API is still experimental. Firefox currently does not support the microphone permission (See here).

Use the MediaDevices API (See here) instead:

function getLocalStream() {
    navigator.mediaDevices.getUserMedia({video: false, audio: true}).then( stream => {
        window.localStream = stream; // A
        window.localAudio.srcObject = stream; // B
        window.localAudio.autoplay = true; // C
    }).catch( err => {
        console.log("u got an error:" + err)
    });
}

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!