mediaDevices.enumerateDevices() returning empty list

I have got everything working, requested and granted permissions, but requesting media devices gives me an empty list:

const lst = await mediaDevices.enumerateDevices()
console.log("Devices:", lst)

// Output
Devices: []

What could be a reason for that?

I’m seeing the same problem while running an iOS simulator - is it possible you need a physical device in order to have this work?

edit: confirmed, mediaDevices.enumerateDevices() returns a populated array when running it on a physical device.

Yes, you will need a physical devise for it.