static fromManifest(originalUri, manifest, size, metadata) {
    goog.asserts.assert(
        manifest.variants.length,
        'Cannot create stored content from manifest with no variants.');

    /** @type {number} */
    const duration = manifest.presentationTimeline.getDuration();

    /** @type {!Array<shaka.extern.Track>} */
    const tracks = shaka.offline.StoredContentUtils.getTracks_(manifest);

    /** @type {shaka.extern.StoredContent} */
    const content = {
      offlineUri: null,
      originalManifestUri: originalUri,
      duration: duration,
      size: size,
      // This expiration value is temporary and will be used in progress reports
      // during the storage process.  The real value would have to come from
      // DrmEngine.
      expiration: Infinity,
      tracks: tracks,
      appMetadata: metadata,
      isIncomplete: false,
    };

    return content;
  }
@param {string} originalUri
@param {shaka.extern.Manifest} manifest
@param {number} size
@param {!Object} metadata
@return {shaka.extern.StoredContent}