filterManifestWithRestrictions(manifest) {
    const tracksChanged = this.applyRestrictions(manifest);

    if (manifest) {
      // We may need to create new sessions for any new init data.
      const currentDrmInfo =
          this.drmEngine_ ? this.drmEngine_.getDrmInfo() : null;
      // DrmEngine.newInitData() requires mediaKeys to be available.
      if (currentDrmInfo && this.drmEngine_.getMediaKeys()) {
        const streams = new Set();
        for (const variant of manifest.variants) {
          if (variant.audio) {
            streams.add(variant.audio);
          }
          if (variant.video) {
            streams.add(variant.video);
          }
        }
        for (const stream of streams) {
          this.processDrmInfos(currentDrmInfo.keySystem, stream);
        }
      }
      this.checkRestrictedVariants(manifest);
    }

    return tracksChanged;
  }
Apply the restrictions configuration to the manifest, and check if there's
a variant that meets the restrictions.

@param {?shaka.extern.Manifest} manifest
@return {boolean} tracksChanged