diff --git a/src/html5-qrcode.ts b/src/html5-qrcode.ts index 3809aec..108bdb7 100644 --- a/src/html5-qrcode.ts +++ b/src/html5-qrcode.ts @@ -732,7 +732,7 @@ export class Html5Qrcode { * @returns a Promise with list of {@code CameraDevice}. */ public static getCameras(): Promise> { - if (navigator.mediaDevices) { + if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { return Html5Qrcode.getCamerasFromMediaDevices(); }