Affecting navigator.mediaDevices and navigator.mozGetUserMedia() can no longer be used on insecure sites

Published: | Categories: Audio & Video, Privacy & Security

Description

Starting with Firefox 69, the navigator.mediaDevices object and the non-standard navigator.mozGetUserMedia method are only available to websites served via HTTPS. Calling the getUserMedia, enumerateDevices or any other method on the navigator.mediaDevices object on an insecure site will throw a TypeError exception because the object doesn’t exist. Google Chrome has already made the same change in version 74.

Note that the getUserMedia method has already been available only to secure sites in Firefox 68. Meanwhile, these methods will continue to be available to http://localhost which is considered as a secure origin, so web developers can test camera and microphone features in a local environment. The production site, however, has to be served via HTTPS at any time.

References