Affecting getUserMedia() and enumerateDevices() can no longer be used on insecure sites

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

Description

Starting with Firefox 68, the getUserMedia and enumerateDevices methods on the MediaDevices interface only work on websites served via HTTPS. When these methods are called on insecure sites, a NotAllowedError exception will be thrown. Google Chrome has already made the change in version 47, and less than 3% of sites are affected according to Mozilla’s Telemetry data.

In the near future, the navigator.mediaDevices object and the navigator.mozGetUserMedia method will also require secure origins as per the current Media Capture and Streams spec. Make sure to always serve your site via HTTPS.

References