Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigator.getUserMedia and Navigator.webkitGetUserMedia undefined after updating to Chrome 74

After updating from Chrome 73 to 74 navigator.getUserMedia and navigator.webkitGetUserMedia return undefined.

Here https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia I see that getUserMedia is actually deprecated in favor of navigator.mediaDevices.getUserMedia(), but in my case navigator.mediaDevices too is undefined so I cannot use it.

Anyone knows if it's a bug in the latest release of Chrome or if I need to use something else?

like image 761
Mauro Piccotti Avatar asked May 06 '19 12:05

Mauro Piccotti


1 Answers

Since version 74 of Chrome navigator.getUserMedia, navigator.webkitGetUserMedia and navigator.mediaDevices can be used only in secure context (https), otherwise they are undefined.

I've understood what the problem was while writing the question, as usual...

like image 198
Mauro Piccotti Avatar answered Sep 19 '22 07:09

Mauro Piccotti