Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

navigator.mediaDevices.enumerateDevices() only Returns Default Devices on Safari?

Tags:

webrtc

On Firefox and Chrome,

navigator.mediaDevices.enumerateDevices()

...returns a list of all connected audio and video devices.

But on desktop Safari, at least on my system, it's only returning the default devices.

Is this expected behavior?

like image 609
VikR Avatar asked Jul 17 '18 17:07

VikR


1 Answers

I just ran into this problem myself.

AFAICT Safari only gets default devices until after getUserMedia is called.

The demo at simpl.info/sources handles this.

like image 123
Sam Dutton Avatar answered Sep 17 '22 10:09

Sam Dutton