createStreams_(downloader, estimator, drmEngine, manifest, config) {
    // Download infos are stored based on their refId, to deduplicate them.
    /** @type {!Map<string, !shaka.offline.DownloadInfo>} */
    const toDownload = new Map();

    // Find the streams we want to download and create a stream db instance
    // for each of them.
    const streamSet =
        shaka.offline.Storage.getAllStreamsFromManifest_(manifest);
    const streamDBs = new Map();

    for (const stream of streamSet) {
      const streamDB = this.createStream_(
          downloader, estimator, manifest, stream, config, toDownload);
      streamDBs.set(stream.id, streamDB);
    }

    // Connect streams and variants together.
    for (const variant of manifest.variants) {
      if (variant.audio) {
        streamDBs.get(variant.audio.id).variantIds.push(variant.id);
      }
      if (variant.video) {
        streamDBs.get(variant.video.id).variantIds.push(variant.id);
      }
    }

    return {
      streams: Array.from(streamDBs.values()),
      toDownload: Array.from(toDownload.values()),
    };
  }
Converts manifest Streams to database Streams.

@param {!shaka.offline.DownloadManager} downloader
@param {shaka.offline.StreamBandwidthEstimator} estimator
@param {!shaka.drm.DrmEngine} drmEngine
@param {shaka.extern.Manifest} manifest
@param {shaka.extern.PlayerConfiguration} config
@return {{
  streams: !Array<shaka.extern.StreamDB>,
  toDownload: !Array<!shaka.offline.DownloadInfo>
}}
@private