private checkBrowserSupportAndFeatureConfiguration()

in src/meetingsession/DefaultMeetingSession.ts [154:198]


  private checkBrowserSupportAndFeatureConfiguration(): void {
    const browserBehavior = new DefaultBrowserBehavior();
    const browser = `${browserBehavior.name()} ${browserBehavior.majorVersion()} (${browserBehavior.version()})`;
    this.logger.info(`browser is ${browser}`);
    if (!browserBehavior.isSupported()) {
      this.logger.warn(
        'this browser is not currently supported. ' +
          'Stability may suffer. ' +
          `Supported browsers are: ${browserBehavior.supportString()}.`
      );
    }

    // Validation if a custom video uplink policy is specified
    if (this._configuration.videoUplinkBandwidthPolicy) {
      if (this.isSimulcastUplinkPolicy(this._configuration.videoUplinkBandwidthPolicy)) {
        if (!browserBehavior.hasChromiumWebRTC()) {
          throw new Error('Simulcast is only supported on Chromium-based browsers');
        }
        this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = true;
      } else {
        this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = false;
      }
    }

    if (this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers) {
      if (browserBehavior.hasChromiumWebRTC()) {
        this.logger.info(`Simulcast is enabled for ${browserBehavior.name()}`);
      } else {
        this._configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = false;
        this.logger.info('Simulcast is only supported on Chromium-based browsers');
      }

      if (this._configuration.enableSVC) {
        this._configuration.enableSVC = false;
        this.logger.info('SVC is not successfully enabled since simulcast is enabled');
      }
    }

    if (this._configuration.enableSVC && !browserBehavior.supportsScalableVideoCoding()) {
      this._configuration.enableSVC = false;
      this.logger.info(
        'SVC is only supported on Chromium-based browsers with version 111 or above'
      );
    }
  }