set constraints(constraints) {
    const
      values = constraints || cache.config.constraints;


    const defaultConstraints = Media.constraints();
    ['audio', 'video'].forEach((type) => {
      if (!~this.type.indexOf(type)) { // eslint-disable-line no-bitwise
        values[type] = false;
      } else if (!values[type]) {
        values[type] = defaultConstraints[type];
      }
      if (values[type].deviceId || values[type].facingMode) {
        this._inputs[type] = _getConstraintValue(
          values[type],
          values[type].facingMode ? 'facingMode' : 'deviceId'
        );
      }
    });
    Log.d('Local~set#contraints', values);
    /**
     * @ignore
     */
    this._constraints = values;
  }
/**
   * The Media Constraints. (defaults to global config)
   * @param {MediaConstraints} constraints
   */
The Media Constraints. (defaults to global config)
@param {MediaConstraints} constraints
The Media Constraints . ( defaults to global config ) @param { MediaConstraints } constraints
set constraints(constraints) {
    const
      values = constraints || cache.config.constraints;
    const defaultConstraints = Media.constraints();
    ['audio', 'video'].forEach((type) => {
      if (!~this.type.indexOf(type)) { 
        values[type] = false;
      } else if (!values[type]) {
        values[type] = defaultConstraints[type];
      }
      if (values[type].deviceId || values[type].facingMode) {
        this._inputs[type] = _getConstraintValue(
          values[type],
          values[type].facingMode ? 'facingMode' : 'deviceId'
        );
      }
    });
    Log.d('Local~set#contraints', values);
    this._constraints = values;
  }
set constraints ( constraints ) { const values = constraints || cache . config . constraints ; const defaultConstraints = Media . constraints ( ) ; [ 'audio' , 'video' ] . forEach ( ( type ) => { if ( ! ~ this . type . indexOf ( type ) ) { values [ type ] = false ; } else if ( ! values [ type ] ) { values [ type ] = defaultConstraints [ type ] ; } if ( values [ type ] . deviceId || values [ type ] . facingMode ) { this . _inputs [ type ] = _getConstraintValue ( values [ type ] , values [ type ] . facingMode ? 'facingMode' : 'deviceId' ) ; } } ) ; Log . d ( 'Local~set#contraints' , values ) ; this . _constraints = values ; }
The Media Constraints.
The Media Constraints .
// eslint-disable-line no-bitwise /**
     * @ignore
     */