function makeStream(id, mimeType, codecs, roles, channelsCount,
      spatialAudio = false) {
    return {
      audioSamplingRate: null,
      channelsCount: channelsCount,
      spatialAudio,
      closedCaptions: null,
      codecs: codecs.join(','),
      createSegmentIndex: () => Promise.resolve(),
      emsgSchemeIdUris: null,
      encrypted: false,
      drmInfos: [],
      segmentIndex: null,
      id: id,
      keyIds: new Set(),
      label: null,
      language: '',
      originalLanguage: null,
      mimeType: mimeType,
      originalId: String(id),
      primary: false,
      roles: roles,
      forced: false,
      trickModeVideo: null,
      dependencyStream: null,
      type: '',
      accessibilityPurpose: null,
      external: false,
      groupId: null,
      fastSwitching: false,
      fullMimeTypes: new Set([shaka.util.MimeUtils.getFullType(
          mimeType, codecs.join(','))]),
      isAudioMuxedInVideo: false,
      baseOriginalId: null,
    };
  }
@param {number} id
@param {string} mimeType
@param {!Array<string>} codecs
@param {!Array<string>} roles
@param {?number} channelsCount
@param {boolean=} spatialAudio
@return {shaka.extern.Stream}