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

411
Views
Chrome does not prompt user for camera and/or microphone access even in secure context

I have a webpage served via https with the following script:

const userMediaConstraints = {
    video: true,
    audio: true
};

navigator.mediaDevices.getUserMedia(userMediaConstraints)
    .then(stream => { 
        console.log("Media stream captured.")
    });

When I open it in Firefox or Safari, a prompt asking for permission to use camera and microphone appears. But not in Chrome or Opera. There the access is blocked by default and I have to go to site settings and manually allow the access, which is set to Default(ask).

  • window.isSecureContext is true.
  • navigator.permissions.query({name:'camera'}) resolves to name: "video_capture", onchange: null, state: "prompt".

It looks like Chrome and Opera should show prompt, but they do not. I tested it on a different machine with different user that had no prior history with the website with the same result.

What could be wrong?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You've said you've tried Safari, which suggests to me you're on a Mac.

This issue on the Chrome issues list fits your description really well. (I got there from this on the webrtc/samples GitHub project.) It comes down to a Mac OS security setting. Quoting comment #3:

Please check in Mac system preferences > Security & Privacy > Privacy > Microphone, that Chrome is checked.

(In your case since you want video, you'd also probably have to tick the box under Security & Privacy > Privacy > Camera or similar.)

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!