Browse Source

Returning the request of cameras on the beginning to make sure the UI can load the cameras.

pull/2/head
Vitor Pamplona 5 years ago
parent
commit
70ed102c2a
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      js/instascan.min.js

+ 6
- 2
js/instascan.min.js View File

@ -32640,9 +32640,13 @@ var Camera = function () {
switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return navigator.mediaDevices.enumerateDevices();
return this._ensureAccess();
case 2:
_context3.next = 4;
return navigator.mediaDevices.enumerateDevices();
case 4:
devices = _context3.sent;
return _context3.abrupt('return', devices.filter(function (d) {
return d.kind === 'videoinput';
@ -32650,7 +32654,7 @@ var Camera = function () {
return new Camera(d.deviceId, cameraName(d.label));
}));
case 4:
case 6:
case 'end':
return _context3.stop();
}


Loading…
Cancel
Save