Skip to content

Commit

Permalink
firefox: dont attempt to shim getUserMedia if mediaDevices is not def…
Browse files Browse the repository at this point in the history
…ined

since this can't work. Tentative fix for #1022
  • Loading branch information
fippo committed Aug 15, 2022
1 parent 01d2b81 commit 85c802d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/firefox/getusermedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export function shimGetUserMedia(window, browserDetails) {
const navigator = window && window.navigator;
const MediaStreamTrack = window && window.MediaStreamTrack;

if (!navigator.mediaDevices) {
return;
}

navigator.getUserMedia = function(constraints, onSuccess, onError) {
// Replace Firefox 44+'s deprecation warning with unprefixed version.
utils.deprecated('navigator.getUserMedia',
Expand Down

0 comments on commit 85c802d

Please sign in to comment.