registerApp(appName) {
    if (this.registeredApps_.has(appName) &&
        !this.anyUnknownAppStatus_(appName)) {
      // No need to scan since status for appName is known for all sinks.
      return;
    }

    this.registeredApps_.add(appName);

    if (this.discoveryService_.getSinkCount() == 0) {
      // No sinks, no need to scan.
      return;
    }
    if (!this.running_) {
      this.start();
    } else {
      this.discoveryService_.getSinks().forEach(
          this.doScanSinkForApp_.bind(this, appName));
    }
  }
/**
   * Registers an application name that should be queried. Starts periodic
   * scanning if it hasn't already started. Otherwise, issues an out-of-band
   * query for the app against all discovered sinks.
   * @param {string} appName
   */
Registers an application name that should be queried. Starts periodic
scanning if it hasn't already started. Otherwise, issues an out-of-band
query for the app against all discovered sinks.
@param {string} appName
Registers an application name that should be queried . Starts periodic scanning if it hasn ' t already started . Otherwise issues an out - of - band query for the app against all discovered sinks . @param { string } appName
registerApp(appName) {
    if (this.registeredApps_.has(appName) &&
        !this.anyUnknownAppStatus_(appName)) {
      return;
    }
    this.registeredApps_.add(appName);
    if (this.discoveryService_.getSinkCount() == 0) {
      return;
    }
    if (!this.running_) {
      this.start();
    } else {
      this.discoveryService_.getSinks().forEach(
          this.doScanSinkForApp_.bind(this, appName));
    }
  }
registerApp ( appName ) { if ( this . registeredApps_ . has ( appName ) && ! this . anyUnknownAppStatus_ ( appName ) ) { return ; } this . registeredApps_ . add ( appName ) ; if ( this . discoveryService_ . getSinkCount ( ) == 0 ) { return ; } if ( ! this . running_ ) { this . start ( ) ; } else { this . discoveryService_ . getSinks ( ) . forEach ( this . doScanSinkForApp_ . bind ( this , appName ) ) ; } }
Registers an application name that should be queried.
Registers an application name that should be queried .
// No need to scan since status for appName is known for all sinks. // No sinks, no need to scan.