sendRoutesQueryResultToMr_() {
    if (this.routeQueries_.size == 0) return;

    let routeList = [];
    this.providers_.forEach(p => {
      routeList = routeList.concat(p.getRoutes());
    });

    this.routeQueries_.forEach(sourceUrn => {
      const nonLocalJoinableRouteIds = [];
      this.providers_.forEach(p => {
        const routes = p.getRoutes();
        routes.forEach(route => {
          if (!route.createdLocally && p.canJoin(sourceUrn, undefined, route)) {
            nonLocalJoinableRouteIds.push(route.id);
          }
        });
      });
      this.mediaRouterService_.onRoutesUpdated(
          routeList, sourceUrn, nonLocalJoinableRouteIds);
    });
  }
/**
   * Send routes query result to MR immediately.
   * @private
   */
Send routes query result to MR immediately.
@private
Send routes query result to MR immediately . @private
sendRoutesQueryResultToMr_() {
    if (this.routeQueries_.size == 0) return;
    let routeList = [];
    this.providers_.forEach(p => {
      routeList = routeList.concat(p.getRoutes());
    });
    this.routeQueries_.forEach(sourceUrn => {
      const nonLocalJoinableRouteIds = [];
      this.providers_.forEach(p => {
        const routes = p.getRoutes();
        routes.forEach(route => {
          if (!route.createdLocally && p.canJoin(sourceUrn, undefined, route)) {
            nonLocalJoinableRouteIds.push(route.id);
          }
        });
      });
      this.mediaRouterService_.onRoutesUpdated(
          routeList, sourceUrn, nonLocalJoinableRouteIds);
    });
  }
sendRoutesQueryResultToMr_ ( ) { if ( this . routeQueries_ . size == 0 ) return ; let routeList = [ ] ; this . providers_ . forEach ( p => { routeList = routeList . concat ( p . getRoutes ( ) ) ; } ) ; this . routeQueries_ . forEach ( sourceUrn => { const nonLocalJoinableRouteIds = [ ] ; this . providers_ . forEach ( p => { const routes = p . getRoutes ( ) ; routes . forEach ( route => { if ( ! route . createdLocally && p . canJoin ( sourceUrn , undefined , route ) ) { nonLocalJoinableRouteIds . push ( route . id ) ; } } ) ; } ) ; this . mediaRouterService_ . onRoutesUpdated ( routeList , sourceUrn , nonLocalJoinableRouteIds ) ; } ) ; }
Send routes query result to MR immediately.
Send routes query result to MR immediately .