toTabMediaConstraints_() {

    //
    // Also the tabCapture API shape doesn't match getUserMedia, wich combines
    // audio and video constraints into a single dictionary.
    //
    // Both of these issues make it hard to type toMediaConstraints() properly.
    const constraints = /** @type {!MediaConstraints} */
        ({
          'audio': this.mirrorSettings.shouldCaptureAudio,
          'video': this.mirrorSettings.shouldCaptureVideo
        });

    if (this.mirrorSettings.shouldCaptureVideo) {
      constraints['videoConstraints'] = {
        'mandatory': {'enableAutoThrottling': true}
      };
      this.setCommonVideoConstraints_(
          constraints['videoConstraints']['mandatory']);
    }
    return constraints;
  }
/**
   * @return {!MediaConstraints} Media constraints for use with platform
   * capture APIs.
   * @private
   */
@return {!MediaConstraints} Media constraints for use with platform
capture APIs.
@private
@return { !MediaConstraints } Media constraints for use with platform capture APIs . @private
toTabMediaConstraints_() {
     Also the tabCapture API shape doesn't match getUserMedia, wich combines
     audio and video constraints into a single dictionary.
     Both of these issues make it hard to type toMediaConstraints() properly.
    const constraints = 
        ({
          'audio': this.mirrorSettings.shouldCaptureAudio,
          'video': this.mirrorSettings.shouldCaptureVideo
        });
    if (this.mirrorSettings.shouldCaptureVideo) {
      constraints['videoConstraints'] = {
        'mandatory': {'enableAutoThrottling': true}
      };
      this.setCommonVideoConstraints_(
          constraints['videoConstraints']['mandatory']);
    }
    return constraints;
  }
toTabMediaConstraints_ ( ) { const constraints = ( { 'audio' : this . mirrorSettings . shouldCaptureAudio , 'video' : this . mirrorSettings . shouldCaptureVideo } ) ; if ( this . mirrorSettings . shouldCaptureVideo ) { constraints [ 'videoConstraints' ] = { 'mandatory' : { 'enableAutoThrottling' : true } } ; this . setCommonVideoConstraints_ ( constraints [ 'videoConstraints' ] [ 'mandatory' ] ) ; } return constraints ; }
@return {!MediaConstraints} Media constraints for use with platform
 capture APIs.
@return { !MediaConstraints } Media constraints for use with platform capture APIs .
// // Also the tabCapture API shape doesn't match getUserMedia, wich combines // audio and video constraints into a single dictionary. // // Both of these issues make it hard to type toMediaConstraints() properly. /** @type {!MediaConstraints} */