src/browser/src/createQRScannerInternal.js
function getConstraintObj(deviceId, facingMode, width, height){
      var obj = { audio: false, video: {} };
      obj.video.deviceId = {exact: deviceId};
      if(facingMode) {
        obj.video.facingMode = {exact: facingMode};
      }
      if(width) {
        obj.video.width = {exact: width};
      }
      if(height) {
        obj.video.height = {exact: height};
      }
      return obj;
    }
function getConstraintObj(deviceId, facingMode, width, height){
      var obj = { audio: false, video: {} };
      obj.video.deviceId = {exact: deviceId};
      if(facingMode) {
        obj.video.facingMode = {exact: facingMode};
      }
      if(width) {
        obj.video.width = {exact: width};
      }
      if(height) {
        obj.video.height = {exact: height};
      }
      return obj;
    }
function getConstraintObj ( deviceId , facingMode , width , height ) { var obj = { audio : false , video : { } } ; obj . video . deviceId = { exact : deviceId } ; if ( facingMode ) { obj . video . facingMode = { exact : facingMode } ; } if ( width ) { obj . video . width = { exact : width } ; } if ( height ) { obj . video . height = { exact : height } ; } return obj ; }
return a getUserMedia Constraints
return a getUserMedia Constraints