add(variant, compareCodecs) {
    if (this.canInclude(variant, compareCodecs)) {
      this.variants_.add(variant);
      return true;
    }

    // To be nice, issue a warning if someone is trying to add something that
    // they shouldn't.
    shaka.log.warning('Rejecting variant - not compatible with root.');
    return false;
  }
@param {shaka.extern.Variant} variant
@param {boolean} compareCodecs
@return {boolean}