constructor(manifest, isPartial, id, type, lang, label) {
    // variants can be made up of different combinations of video
    // and audio streams
    // goog.asserts.assert(
    //     !manifest || !manifest.isIdUsed_(id),
    //     'Streams should have unique ids!');
    const ContentType = shaka.util.ManifestParserUtils.ContentType;

    /** @const {shaka.test.ManifestGenerator.Manifest} */
    this.manifest_ = manifest;

    /** @type {shaka.media.InitSegmentReference} */
    this.initSegmentReference_ = null;

    /** @type {string} */
    this.type = type;
    if (id != null) {
      /** @type {number} */
      this.id = id;
    }

    let defaultMimeType = 'text/plain';
    let defaultCodecs = '';
    if (type == ContentType.AUDIO) {
      defaultMimeType = 'audio/mp4';
      defaultCodecs = 'mp4a.40.2';
    } else if (type == ContentType.VIDEO) {
      defaultMimeType = 'video/mp4';
      defaultCodecs = 'avc1.4d401f';
    } else if (type == ContentType.TEXT) {
      defaultMimeType = 'text/vtt';
    }

    if (!isPartial) {
      const shaka_ = manifest ? manifest.shaka_ : shaka;

      /** @type {shaka.media.SegmentIndex} */
      this.segmentIndex = shaka_.media.SegmentIndex.forSingleSegment(
          /* startTime= */ 0, /* duration= */ 10, ['testUri']);

      const create =
          jasmine.createSpy('createSegmentIndex').and.callFake(() => {
            this.segmentIndex = shaka_.media.SegmentIndex.forSingleSegment(
                /* startTime= */ 0, /* duration= */ 10, ['testUri']);
            return Promise.resolve();
          });
      const close = jasmine.createSpy('closeSegmentIndex').and.callFake(() => {
        if (this.segmentIndex) {
          this.segmentIndex.release();
        }
        this.segmentIndex = null;
        return Promise.resolve();
      });

      /** @type {?string} */
      this.originalId = null;
      /** @type {?string} */
      this.groupId = null;
      /** @type {shaka.extern.CreateSegmentIndexFunction} */
      this.createSegmentIndex = shaka.test.Util.spyFunc(create);
      /** @type {!function()|undefined} */
      this.closeSegmentIndex = shaka.test.Util.spyFunc(close);
      /** @type {string} */
      this.mimeType = defaultMimeType;
      /** @type {string} */
      this.codecs = defaultCodecs;
      /** @type {(number|undefined)} */
      this.frameRate = undefined;
      /** @type {(string|undefined)} */
      this.pixelAspectRatio = undefined;
      /** @type {(number|undefined)} */
      this.bandwidth = undefined;
      /** @type {(number|undefined)} */
      this.width = undefined;
      /** @type {(number|undefined)} */
      this.height = undefined;
      /** @type {(string|undefined)} */
      this.kind = undefined;
      /** @type {boolean} */
      this.encrypted = false;
      /** @type {!Array<shaka.extern.DrmInfo>} */
      this.drmInfos = [];
      /** @type {!Set<string>} */
      this.keyIds = new Set();
      /** @type {string} */
      this.language = shaka.util.LanguageUtils.normalize(lang || 'und');
      /** @type {?string} */
      this.originalLanguage = lang || null;
      /** @type {?string} */
      this.label = label || null;
      /** @type {boolean} */
      this.primary = false;
      /** @type {?shaka.extern.Stream} */
      this.trickModeVideo = null;
      /** @type {?shaka.extern.Stream} */
      this.dependencyStream = null;
      /** @type {Array<string>} */
      this.emsgSchemeIdUris = null;
      /** @type {!Array<string>} */
      this.roles = [];
      /** @type {boolean} */
      this.forced = false;
      /** @type {?number} */
      this.channelsCount = null;
      /** @type {?number} */
      this.audioSamplingRate = null;
      /** @type {boolean} */
      this.spatialAudio = false;
      /** @type {Map<string, string>} */
      this.closedCaptions = null;
      /** @type {(string|undefined)} */
      this.hdr = undefined;
      /** @type {(string|undefined)} */
      this.colorGamut = undefined;
      /** @type {(string|undefined)} */
      this.videoLayout = undefined;
      /** @type {(string|undefined)} */
      this.tilesLayout = undefined;
      /** @type {?shaka.media.ManifestParser.AccessibilityPurpose} */
      this.accessibilityPurpose;
      /** @type {boolean} */
      this.external = false;
      /** @type {boolean} */
      this.fastSwitching = false;
      /** @type {boolean} */
      this.isAudioMuxedInVideo = false;
      /** @type {?string} */
      this.baseOriginalId = null;
    }
    /** @type {!Set<string>} */
    this.fullMimeTypes = new Set([shaka.util.MimeUtils.getFullType(
        defaultMimeType, defaultCodecs)]);

    /** @type {shaka.extern.Stream} */
    const foo = this;
    goog.asserts.assert(foo, 'Checking for type compatibility');
  }
@param {shaka.test.ManifestGenerator.Manifest} manifest
@param {boolean} isPartial
@param {?number} id
@param {shaka.util.ManifestParserUtils.ContentType} type
@param {?string=} lang
@param {string=} label