static applyRestrictions(variants, restrictions, maxHwRes) {
    let tracksChanged = false;

    for (const variant of variants) {
      const originalAllowed = variant.allowedByApplication;
      variant.allowedByApplication = shaka.util.StreamUtils.meetsRestrictions(
          variant, restrictions, maxHwRes);

      if (originalAllowed != variant.allowedByApplication) {
        tracksChanged = true;
      }
    }

    return tracksChanged;
  }
@param {!Array<shaka.extern.Variant>} variants
@param {shaka.extern.Restrictions} restrictions
@param {shaka.extern.Resolution} maxHwRes
@return {boolean} Whether the tracks changed.