Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

78
Views
Chrome mediaDevices.enumerateDevices() does not list default videoinput first

I have multiple cameras installed on my Mac. I can check the default camera for Chrome in the settings (chrome://settings/content/camera?search=camera).

Now, when I list all devices, my chrome "default" camera is the last one. I check it this way (even in Chrome console):

navigator.mediaDevices.enumerateDevices()
   .then(devices => {
        console.log(devices.filter(d => d.kind==="videoinput"))
   })

However, MDN states that

The order is significant - the default capture devices will be listed first.

And this is where I'm confused. Am I doing something wrong? Is there any way to retrieve "default browser" videoinput (aka camera)?

Thanks

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs