static createCaptureParameters_(
      sourceUrn, mirrorSettings, opt_presentationId) {
    if (mr.MediaSourceUtils.isTabMirrorSource(sourceUrn)) {
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.TAB, mirrorSettings);
    } else if (mr.MediaSourceUtils.isDesktopMirrorSource(sourceUrn)) {
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.DESKTOP, mirrorSettings);
    } else if (mr.MediaSourceUtils.isPresentationSource(sourceUrn)) {
      if (!opt_presentationId) {
        throw new mr.mirror.Error('Missing offscreen tab presentation id');
      }
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.OFFSCREEN_TAB, mirrorSettings, sourceUrn,
          /** @type {!string} */ (opt_presentationId));
    } else {
      throw new mr.mirror.Error(
          'Source URN does not suggest a known capture type.');
    }
  }
/**
   * Creates a new mr.mirror.CaptureParameters from the given inputs.
   *
   * @param {string} sourceUrn
   * @param {!mr.mirror.Settings} mirrorSettings
   * @param {string=} opt_presentationId
   * @return {!mr.mirror.CaptureParameters}
   * @private
   */
Creates a new mr.mirror.CaptureParameters from the given inputs.
Creates a new mr . mirror . CaptureParameters from the given inputs .
static createCaptureParameters_(
      sourceUrn, mirrorSettings, opt_presentationId) {
    if (mr.MediaSourceUtils.isTabMirrorSource(sourceUrn)) {
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.TAB, mirrorSettings);
    } else if (mr.MediaSourceUtils.isDesktopMirrorSource(sourceUrn)) {
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.DESKTOP, mirrorSettings);
    } else if (mr.MediaSourceUtils.isPresentationSource(sourceUrn)) {
      if (!opt_presentationId) {
        throw new mr.mirror.Error('Missing offscreen tab presentation id');
      }
      return new mr.mirror.CaptureParameters(
          mr.mirror.CaptureSurfaceType.OFFSCREEN_TAB, mirrorSettings, sourceUrn,
           (opt_presentationId));
    } else {
      throw new mr.mirror.Error(
          'Source URN does not suggest a known capture type.');
    }
  }
static createCaptureParameters_ ( sourceUrn , mirrorSettings , opt_presentationId ) { if ( mr . MediaSourceUtils . isTabMirrorSource ( sourceUrn ) ) { return new mr . mirror . CaptureParameters ( mr . mirror . CaptureSurfaceType . TAB , mirrorSettings ) ; } else if ( mr . MediaSourceUtils . isDesktopMirrorSource ( sourceUrn ) ) { return new mr . mirror . CaptureParameters ( mr . mirror . CaptureSurfaceType . DESKTOP , mirrorSettings ) ; } else if ( mr . MediaSourceUtils . isPresentationSource ( sourceUrn ) ) { if ( ! opt_presentationId ) { throw new mr . mirror . Error ( 'Missing offscreen tab presentation id' ) ; } return new mr . mirror . CaptureParameters ( mr . mirror . CaptureSurfaceType . OFFSCREEN_TAB , mirrorSettings , sourceUrn , ( opt_presentationId ) ) ; } else { throw new mr . mirror . Error ( 'Source URN does not suggest a known capture type.' ) ; } }
Creates a new mr.mirror.CaptureParameters from the given inputs.
Creates a new mr . mirror . CaptureParameters from the given inputs .
/** @type {!string} */