areAVStreamsCompatible_(outputStream, candidate) {
    // Check for an exact match.
    if (!shaka.util.PeriodCombiner.areAVStreamsExactMatch_(
        outputStream, candidate)) {
      // It's not an exact match. See if we can do multi-codec or multi-mimeType
      // stream instead, using SourceBuffer.changeType.
      if (!this.multiTypeVariantsAllowed_) {
        return false;
      }
    }

    // This field is only available on Stream, not StreamDB.
    if (outputStream.drmInfos) {
      // Check for compatible DRM systems.  Note that clear streams are
      // implicitly compatible with any DRM and with each other.
      if (!shaka.drm.DrmUtils.areDrmCompatible(outputStream.drmInfos,
          candidate.drmInfos)) {
        return false;
      }
    }

    return true;
  }
@param {T} outputStream An audio or video output stream
@param {T} candidate A candidate stream to be combined with the output
@return {boolean} True if the candidate could be combined with the
  output stream

@template T
Accepts either a StreamDB or Stream type.

@private