Source: externs/shaka/manifest.js

  1. /*! @license
  2. * Shaka Player
  3. * Copyright 2016 Google LLC
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @externs
  8. */
  9. /**
  10. * @typedef {{
  11. * presentationTimeline: !shaka.media.PresentationTimeline,
  12. * variants: !Array.<shaka.extern.Variant>,
  13. * textStreams: !Array.<shaka.extern.Stream>,
  14. * imageStreams: !Array.<shaka.extern.Stream>,
  15. * offlineSessionIds: !Array.<string>,
  16. * minBufferTime: number,
  17. * sequenceMode: boolean,
  18. * ignoreManifestTimestampsInSegmentsMode: boolean,
  19. * type: string,
  20. * serviceDescription: ?shaka.extern.ServiceDescription,
  21. * nextUrl: ?string
  22. * }}
  23. *
  24. * @description
  25. * <p>
  26. * A Manifest object describes a collection of streams (segmented audio, video,
  27. * or text data) that share a common timeline. We call the collection of
  28. * streams "the presentation" and their timeline "the presentation timeline".
  29. * A Manifest describes one of two types of presentations: live and
  30. * video-on-demand.
  31. * </p>
  32. *
  33. * <p>
  34. * A live presentation begins at some point in time and either continues
  35. * indefinitely or ends when the presentation stops broadcasting. For a live
  36. * presentation, wall-clock time maps onto the presentation timeline, and the
  37. * current wall-clock time maps to the live-edge (AKA "the current presentation
  38. * time"). In contrast, a video-on-demand presentation exists entirely
  39. * independent of wall-clock time.
  40. * </p>
  41. *
  42. * <p>
  43. * A variant is a combination of an audio and a video streams that can be played
  44. * together.
  45. * </p>
  46. *
  47. * <p>
  48. * A stream has the same logical content as another stream if the only
  49. * difference between the two is their quality. For example, an SD video stream
  50. * and an HD video stream that depict the same scene have the same logical
  51. * content; whereas an English audio stream and a French audio stream have
  52. * different logical contents. The player can automatically switch between
  53. * streams which have the same logical content to adapt to network conditions.
  54. * </p>
  55. *
  56. * @property {!shaka.media.PresentationTimeline} presentationTimeline
  57. * <i>Required.</i> <br>
  58. * The presentation timeline.
  59. * @property {!Array.<shaka.extern.Variant>} variants
  60. * <i>Required.</i> <br>
  61. * The presentation's Variants. There must be at least one Variant.
  62. * @property {!Array.<shaka.extern.Stream>} textStreams
  63. * <i>Required.</i> <br>
  64. * The presentation's text streams.
  65. * @property {!Array.<shaka.extern.Stream>} imageStreams
  66. * <i>Required.</i> <br>
  67. * The presentation's image streams
  68. * @property {!Array.<string>} offlineSessionIds
  69. * <i>Defaults to [].</i> <br>
  70. * An array of EME sessions to load for offline playback.
  71. * @property {number} minBufferTime
  72. * <i>Defaults to 0.</i> <br>
  73. * The minimum number of seconds of content that must be buffered before
  74. * playback can begin. Can be overridden by a higher value from the Player
  75. * configuration.
  76. * @property {boolean} sequenceMode
  77. * If true, we will append the media segments using sequence mode; that is to
  78. * say, ignoring any timestamps inside the media files.
  79. * @property {boolean} ignoreManifestTimestampsInSegmentsMode
  80. * If true, don't adjust the timestamp offset to account for manifest
  81. * segment durations being out of sync with segment durations. In other
  82. * words, assume that there are no gaps in the segments when appending
  83. * to the SourceBuffer, even if the manifest and segment times disagree.
  84. * Only applies when sequenceMode is <code>false</code>, and only for HLS
  85. * streams.
  86. * <i>Defaults to <code>false</code>.</i>
  87. * @property {string} type
  88. * Indicates the type of the manifest. It can be <code>'HLS'</code> or
  89. * <code>'DASH'</code>.
  90. * @property {?shaka.extern.ServiceDescription} serviceDescription
  91. * The service description for the manifest. Used to adapt playbackRate to
  92. * decrease latency.
  93. * @property {?string} nextUrl
  94. * The next url to play.
  95. *
  96. * @exportDoc
  97. */
  98. shaka.extern.Manifest;
  99. /**
  100. * @typedef {{
  101. * id: string,
  102. * audioStreams: !Array.<shaka.extern.Stream>,
  103. * videoStreams: !Array.<shaka.extern.Stream>,
  104. * textStreams: !Array.<shaka.extern.Stream>,
  105. * imageStreams: !Array.<shaka.extern.Stream>
  106. * }}
  107. *
  108. * @description Contains the streams from one DASH period.
  109. * For use in {@link shaka.util.PeriodCombiner}.
  110. *
  111. * @property {string} id
  112. * The Period ID.
  113. * @property {!Array.<shaka.extern.Stream>} audioStreams
  114. * The audio streams from one Period.
  115. * @property {!Array.<shaka.extern.Stream>} videoStreams
  116. * The video streams from one Period.
  117. * @property {!Array.<shaka.extern.Stream>} textStreams
  118. * The text streams from one Period.
  119. * @property {!Array.<shaka.extern.Stream>} imageStreams
  120. * The image streams from one Period.
  121. *
  122. * @exportDoc
  123. */
  124. shaka.extern.Period;
  125. /**
  126. * @typedef {{
  127. * initData: !Uint8Array,
  128. * initDataType: string,
  129. * keyId: ?string
  130. * }}
  131. *
  132. * @description
  133. * Explicit initialization data, which override any initialization data in the
  134. * content. The initDataType values and the formats that they correspond to
  135. * are specified {@link https://bit.ly/EmeInitTypes here}.
  136. *
  137. * @property {!Uint8Array} initData
  138. * Initialization data in the format indicated by initDataType.
  139. * @property {string} initDataType
  140. * A string to indicate what format initData is in.
  141. * @property {?string} keyId
  142. * The key Id that corresponds to this initData.
  143. *
  144. * @exportDoc
  145. */
  146. shaka.extern.InitDataOverride;
  147. /**
  148. * @typedef {{
  149. * targetLatency:?number,
  150. * maxLatency: ?number,
  151. * maxPlaybackRate: ?number,
  152. * minLatency: ?number,
  153. * minPlaybackRate: ?number
  154. * }}
  155. *
  156. * @description
  157. * Maximum and minimum latency and playback rate for a manifest. When max
  158. * latency is reached playbackrate is updated to maxPlaybackRate to decrease
  159. * latency. When min latency is reached playbackrate is updated to
  160. * minPlaybackRate to increase latency.
  161. * More information {@link https://dashif.org/docs/CR-Low-Latency-Live-r8.pdf here}.
  162. *
  163. * @property {?number} targetLatency
  164. * The target latency to aim for.
  165. * @property {?number} maxLatency
  166. * Maximum latency in seconds.
  167. * @property {?number} maxPlaybackRate
  168. * Maximum playback rate.
  169. * @property {?number} minLatency
  170. * Minimum latency in seconds.
  171. * @property {?number} minPlaybackRate
  172. * Minimum playback rate.
  173. *
  174. * @exportDoc
  175. */
  176. shaka.extern.ServiceDescription;
  177. /**
  178. * @typedef {{
  179. * keySystem: string,
  180. * encryptionScheme: string,
  181. * licenseServerUri: string,
  182. * distinctiveIdentifierRequired: boolean,
  183. * persistentStateRequired: boolean,
  184. * audioRobustness: string,
  185. * videoRobustness: string,
  186. * serverCertificate: Uint8Array,
  187. * serverCertificateUri: string,
  188. * sessionType: string,
  189. * initData: Array.<!shaka.extern.InitDataOverride>,
  190. * keyIds: Set.<string>
  191. * }}
  192. *
  193. * @description
  194. * DRM configuration for a single key system.
  195. *
  196. * @property {string} keySystem
  197. * <i>Required.</i> <br>
  198. * The key system, e.g., "com.widevine.alpha".
  199. * @property {string} encryptionScheme
  200. * <i>Required.</i> <br>
  201. * The encryption scheme, e.g., "cenc", "cbcs", "cbcs-1-9".
  202. * @property {string} licenseServerUri
  203. * <i>Filled in by DRM config if missing.</i> <br>
  204. * The license server URI.
  205. * @property {boolean} distinctiveIdentifierRequired
  206. * <i>Defaults to false. Can be filled in by advanced DRM config.</i> <br>
  207. * True if the application requires the key system to support distinctive
  208. * identifiers.
  209. * @property {boolean} persistentStateRequired
  210. * <i>Defaults to false. Can be filled in by advanced DRM config.</i> <br>
  211. * True if the application requires the key system to support persistent
  212. * state, e.g., for persistent license storage.
  213. * @property {string} sessionType
  214. * <i>Defaults to 'temporary' if Shaka wasn't initiated for storage.
  215. * Can be filled in by advanced DRM config sessionType parameter.</i> <br>
  216. * @property {string} audioRobustness
  217. * <i>Defaults to '', e.g., no specific robustness required. Can be filled in
  218. * by advanced DRM config.</i> <br>
  219. * A key-system-specific string that specifies a required security level.
  220. * @property {string} videoRobustness
  221. * <i>Defaults to '', e.g., no specific robustness required. Can be filled in
  222. * by advanced DRM config.</i> <br>
  223. * A key-system-specific string that specifies a required security level.
  224. * @property {Uint8Array} serverCertificate
  225. * <i>Defaults to null, e.g., certificate will be requested from the license
  226. * server if required. Can be filled in by advanced DRM config.</i> <br>
  227. * A key-system-specific server certificate used to encrypt license requests.
  228. * Its use is optional and is meant as an optimization to avoid a round-trip
  229. * to request a certificate.
  230. * @property {string} serverCertificateUri
  231. * <i>Defaults to '', e.g., server certificate will be requested from the
  232. * given URI if serverCertificate is not provided. Can be filled in by
  233. * advanced DRM config.</i>
  234. * @property {Array.<!shaka.extern.InitDataOverride>} initData
  235. * <i>Defaults to [], e.g., no override.</i> <br>
  236. * A list of initialization data which override any initialization data found
  237. * in the content. See also shaka.extern.InitDataOverride.
  238. * @property {Set.<string>} keyIds
  239. * <i>Defaults to the empty Set</i> <br>
  240. * If not empty, contains the default key IDs for this key system, as
  241. * lowercase hex strings.
  242. * @exportDoc
  243. */
  244. shaka.extern.DrmInfo;
  245. /**
  246. * @typedef {{
  247. * id: number,
  248. * language: string,
  249. * disabledUntilTime: number,
  250. * primary: boolean,
  251. * audio: ?shaka.extern.Stream,
  252. * video: ?shaka.extern.Stream,
  253. * bandwidth: number,
  254. * allowedByApplication: boolean,
  255. * allowedByKeySystem: boolean,
  256. * decodingInfos: !Array.<MediaCapabilitiesDecodingInfo>
  257. * }}
  258. *
  259. * @description
  260. * A Variant describes a combination of an audio and video streams which
  261. * could be played together. It's possible to have a video/audio only
  262. * variant.
  263. *
  264. * @property {number} id
  265. * <i>Required.</i> <br>
  266. * A unique ID among all Variant objects within the same Manifest.
  267. * @property {string} language
  268. * <i>Defaults to '' (i.e., unknown).</i> <br>
  269. * The Variant's language, specified as a language code. <br>
  270. * See {@link https://tools.ietf.org/html/rfc5646} <br>
  271. * See {@link http://www.iso.org/iso/home/standards/language_codes.htm}
  272. * @property {number} disabledUntilTime
  273. * <i>Defaults to 0.</i> <br>
  274. * 0 means the variant is enabled. The Player will set this value to
  275. * "(Date.now() / 1000) + config.streaming.maxDisabledTime" and once this
  276. * maxDisabledTime has passed Player will set the value to 0 in order to
  277. * reenable the variant.
  278. * @property {boolean} primary
  279. * <i>Defaults to false.</i> <br>
  280. * True indicates that the player should use this Variant over others if user
  281. * preferences cannot be met. The player may still use another Variant to
  282. * meet user preferences.
  283. * @property {?shaka.extern.Stream} audio
  284. * The audio stream of the variant.
  285. * @property {?shaka.extern.Stream} video
  286. * The video stream of the variant.
  287. * @property {number} bandwidth
  288. * The variant's required bandwidth in bits per second.
  289. * @property {boolean} allowedByApplication
  290. * <i>Defaults to true.</i><br>
  291. * Set by the Player to indicate whether the variant is allowed to be played
  292. * by the application.
  293. * @property {boolean} allowedByKeySystem
  294. * <i>Defaults to true.</i><br>
  295. * Set by the Player to indicate whether the variant is allowed to be played
  296. * by the key system.
  297. * @property {!Array.<MediaCapabilitiesDecodingInfo>} decodingInfos
  298. * <i>Defaults to [].</i><br>
  299. * Set by StreamUtils to indicate the results from MediaCapabilities
  300. * decodingInfo.
  301. *
  302. * @exportDoc
  303. */
  304. shaka.extern.Variant;
  305. /**
  306. * Creates a SegmentIndex; returns a Promise that resolves after the
  307. * SegmentIndex has been created.
  308. *
  309. * @typedef {function(): !Promise}
  310. * @exportDoc
  311. */
  312. shaka.extern.CreateSegmentIndexFunction;
  313. /**
  314. * @typedef {{
  315. * bitsKey: number,
  316. * blockCipherMode: string,
  317. * cryptoKey: (webCrypto.CryptoKey|undefined),
  318. * fetchKey: (shaka.extern.CreateSegmentIndexFunction|undefined),
  319. * iv: (!Uint8Array|undefined),
  320. * firstMediaSequenceNumber: number
  321. * }}
  322. *
  323. * @description
  324. * AES key and iv info from the manifest.
  325. *
  326. * @property {number} bitsKey
  327. * The number of the bit key (eg: 128, 256).
  328. * @property {string} blockCipherMode
  329. * The block cipher mode of operation. Possible values: 'CTR' or 'CBC'.
  330. * @property {webCrypto.CryptoKey|undefined} cryptoKey
  331. * Web crypto key object of the AES key. If unset, the "fetchKey"
  332. * property should be provided.
  333. * @property {shaka.extern.FetchCryptoKeysFunction|undefined} fetchKey
  334. * A function that fetches the key.
  335. * Should be provided if the "cryptoKey" property is unset.
  336. * Should update this object in-place, to set "cryptoKey".
  337. * @property {(!Uint8Array|undefined)} iv
  338. * The IV in the manifest, if defined. For HLS see HLS RFC 8216 Section 5.2
  339. * for handling undefined IV.
  340. * @property {number} firstMediaSequenceNumber
  341. * The starting Media Sequence Number of the playlist, used when IV is
  342. * undefined.
  343. *
  344. * @exportDoc
  345. */
  346. shaka.extern.aesKey;
  347. /**
  348. * A function that fetches the crypto keys for AES-128.
  349. * Returns a promise that resolves when the keys have been fetched.
  350. *
  351. * @typedef {function(): !Promise}
  352. * @exportDoc
  353. */
  354. shaka.extern.FetchCryptoKeysFunction;
  355. /**
  356. * SegmentIndex minimal API.
  357. * @interface
  358. * @exportDoc
  359. */
  360. shaka.extern.SegmentIndex = class {
  361. /**
  362. * Get number of references.
  363. * @return {number}
  364. * @exportDoc
  365. */
  366. getNumReferences() {}
  367. /**
  368. * Finds the position of the segment for the given time, in seconds, relative
  369. * to the start of the presentation. Returns the position of the segment
  370. * with the largest end time if more than one segment is known for the given
  371. * time.
  372. *
  373. * @param {number} time
  374. * @return {?number} The position of the segment, or null if the position of
  375. * the segment could not be determined.
  376. * @exportDoc
  377. */
  378. find(time) {}
  379. /**
  380. * Gets the SegmentReference for the segment at the given position.
  381. *
  382. * @param {number} position The position of the segment as returned by find().
  383. * @return {shaka.media.SegmentReference} The SegmentReference, or null if
  384. * no such SegmentReference exists.
  385. * @exportDoc
  386. */
  387. get(position) {}
  388. /**
  389. * Gets number of already evicted segments.
  390. * @return {number}
  391. * @exportDoc
  392. */
  393. getNumEvicted() {}
  394. };
  395. /**
  396. * @typedef {{
  397. * id: number,
  398. * originalId: ?string,
  399. * groupId: ?string,
  400. * createSegmentIndex: shaka.extern.CreateSegmentIndexFunction,
  401. * closeSegmentIndex: (function()|undefined),
  402. * segmentIndex: shaka.media.SegmentIndex,
  403. * mimeType: string,
  404. * codecs: string,
  405. * frameRate: (number|undefined),
  406. * pixelAspectRatio: (string|undefined),
  407. * hdr: (string|undefined),
  408. * colorGamut: (string|undefined),
  409. * videoLayout: (string|undefined),
  410. * bandwidth: (number|undefined),
  411. * width: (number|undefined),
  412. * height: (number|undefined),
  413. * kind: (string|undefined),
  414. * encrypted: boolean,
  415. * drmInfos: !Array.<shaka.extern.DrmInfo>,
  416. * keyIds: !Set.<string>,
  417. * language: string,
  418. * originalLanguage: ?string,
  419. * label: ?string,
  420. * type: string,
  421. * primary: boolean,
  422. * trickModeVideo: ?shaka.extern.Stream,
  423. * emsgSchemeIdUris: ?Array.<string>,
  424. * roles: !Array.<string>,
  425. * accessibilityPurpose: ?shaka.media.ManifestParser.AccessibilityPurpose,
  426. * forced: boolean,
  427. * channelsCount: ?number,
  428. * audioSamplingRate: ?number,
  429. * spatialAudio: boolean,
  430. * closedCaptions: Map.<string, string>,
  431. * tilesLayout: (string|undefined),
  432. * matchedStreams:
  433. * (!Array.<shaka.extern.Stream>|!Array.<shaka.extern.StreamDB>|
  434. * undefined),
  435. * mssPrivateData: (shaka.extern.MssPrivateData|undefined),
  436. * external: boolean,
  437. * fastSwitching: boolean,
  438. * fullMimeTypes: !Set.<string>
  439. * }}
  440. *
  441. * @description
  442. * A Stream object describes a single stream (segmented media data).
  443. *
  444. * @property {number} id
  445. * <i>Required.</i> <br>
  446. * A unique ID among all Stream objects within the same Manifest.
  447. * @property {?string} originalId
  448. * <i>Optional.</i> <br>
  449. * The original ID, if any, that appeared in the manifest. For example, in
  450. * DASH, this is the "id" attribute of the Representation element. In HLS,
  451. * this is the "NAME" attribute.
  452. * @property {?string} groupId
  453. * <i>Optional.</i> <br>
  454. * The ID of the stream's parent element. In DASH, this will be a unique
  455. * ID that represents the representation's parent adaptation element
  456. * @property {shaka.extern.CreateSegmentIndexFunction} createSegmentIndex
  457. * <i>Required.</i> <br>
  458. * Creates the Stream's segmentIndex (asynchronously).
  459. * @property {(function()|undefined)} closeSegmentIndex
  460. * <i>Optional.</i> <br>
  461. * Closes the Stream's segmentIndex.
  462. * @property {shaka.media.SegmentIndex} segmentIndex
  463. * <i>Required.</i> <br>
  464. * May be null until createSegmentIndex() is complete.
  465. * @property {string} mimeType
  466. * <i>Required.</i> <br>
  467. * The Stream's MIME type, e.g., 'audio/mp4', 'video/webm', or 'text/vtt'.
  468. * In the case of a stream that adapts between different periods with
  469. * different MIME types, this represents only the first period.
  470. * @property {string} codecs
  471. * <i>Defaults to '' (i.e., unknown / not needed).</i> <br>
  472. * The Stream's codecs, e.g., 'avc1.4d4015' or 'vp9', which must be
  473. * compatible with the Stream's MIME type. <br>
  474. * In the case of a stream that adapts between different periods with
  475. * different codecs, this represents only the first period.
  476. * See {@link https://tools.ietf.org/html/rfc6381}
  477. * @property {(number|undefined)} frameRate
  478. * <i>Video streams only.</i> <br>
  479. * The Stream's framerate in frames per second
  480. * @property {(string|undefined)} pixelAspectRatio
  481. * <i>Video streams only.</i> <br>
  482. * The Stream's pixel aspect ratio
  483. * @property {(string|undefined)} hdr
  484. * <i>Video streams only.</i> <br>
  485. * The Stream's HDR info
  486. * @property {(string|undefined)} colorGamut
  487. * <i>Video streams only.</i> <br>
  488. * The Stream's color gamut info
  489. * @property {(string|undefined)} videoLayout
  490. * <i>Video streams only.</i> <br>
  491. * The Stream's video layout info.
  492. * @property {(number|undefined)} bandwidth
  493. * <i>Audio and video streams only.</i> <br>
  494. * The stream's required bandwidth in bits per second.
  495. * @property {(number|undefined)} width
  496. * <i>Video streams only.</i> <br>
  497. * The stream's width in pixels.
  498. * @property {(number|undefined)} height
  499. * <i>Video streams only.</i> <br>
  500. * The stream's height in pixels.
  501. * @property {(string|undefined)} kind
  502. * <i>Text streams only.</i> <br>
  503. * The kind of text stream. For example, 'caption' or 'subtitle'.
  504. * @see https://bit.ly/TextKind
  505. * @property {boolean} encrypted
  506. * <i>Defaults to false.</i><br>
  507. * True if the stream is encrypted.
  508. * @property {!Array.<!shaka.extern.DrmInfo>} drmInfos
  509. * <i>Defaults to [] (i.e., no DRM).</i> <br>
  510. * An array of DrmInfo objects which describe DRM schemes are compatible with
  511. * the content.
  512. * @property {!Set.<string>} keyIds
  513. * <i>Defaults to empty (i.e., unencrypted or key ID unknown).</i> <br>
  514. * The stream's key IDs as lowercase hex strings. These key IDs identify the
  515. * encryption keys that the browser (key system) can use to decrypt the
  516. * stream.
  517. * @property {string} language
  518. * The Stream's language, specified as a language code. <br>
  519. * Audio stream's language must be identical to the language of the containing
  520. * Variant.
  521. * @property {?string} originalLanguage
  522. * <i>Optional.</i> <br>
  523. * The original language, if any, that appeared in the manifest.
  524. * @property {?string} label
  525. * The Stream's label, unique text that should describe the audio/text track.
  526. * @property {string} type
  527. * <i>Required.</i> <br>
  528. * Content type (e.g. 'video', 'audio' or 'text', 'image')
  529. * @property {boolean} primary
  530. * <i>Defaults to false.</i> <br>
  531. * True indicates that the player should use this Stream over others if user
  532. * preferences cannot be met. The player may still use another Variant to
  533. * meet user preferences.
  534. * @property {?shaka.extern.Stream} trickModeVideo
  535. * <i>Video streams only.</i> <br>
  536. * An alternate video stream to use for trick mode playback.
  537. * @property {?Array.<string>} emsgSchemeIdUris
  538. * <i>Defaults to empty.</i><br>
  539. * Array of registered emsg box scheme_id_uri that should result in
  540. * Player events.
  541. * @property {!Array.<string>} roles
  542. * The roles of the stream as they appear on the manifest,
  543. * e.g. 'main', 'caption', or 'commentary'.
  544. * @property {?shaka.media.ManifestParser.AccessibilityPurpose}
  545. * accessibilityPurpose
  546. * The DASH accessibility descriptor, if one was provided for this stream.
  547. * @property {boolean} forced
  548. * <i>Defaults to false.</i> <br>
  549. * Whether the stream set was forced
  550. * @property {?number} channelsCount
  551. * The channel count information for the audio stream.
  552. * @property {?number} audioSamplingRate
  553. * Specifies the maximum sampling rate of the content.
  554. * @property {boolean} spatialAudio
  555. * <i>Defaults to false.</i> <br>
  556. * Whether the stream set has spatial audio
  557. * @property {Map.<string, string>} closedCaptions
  558. * A map containing the description of closed captions, with the caption
  559. * channel number (CC1 | CC2 | CC3 | CC4) as the key and the language code
  560. * as the value. If the channel number is not provided by the description,
  561. * we'll set a 0-based index as the key. If the language code is not
  562. * provided by the description we'll set the same value as channel number.
  563. * Example: {'CC1': 'eng'; 'CC3': 'swe'}, or {'1', 'eng'; '2': 'swe'}, etc.
  564. * @property {(string|undefined)} tilesLayout
  565. * <i>Image streams only.</i> <br>
  566. * The value is a grid-item-dimension consisting of two positive decimal
  567. * integers in the format: column-x-row ('4x3'). It describes the arrangement
  568. * of Images in a Grid. The minimum valid LAYOUT is '1x1'.
  569. * @property {(!Array.<shaka.extern.Stream>|!Array.<shaka.extern.StreamDB>|
  570. * undefined)} matchedStreams
  571. * The streams in all periods which match the stream. Used for Dash.
  572. * @property {(shaka.extern.MssPrivateData|undefined)} mssPrivateData
  573. * <i>Microsoft Smooth Streaming only.</i> <br>
  574. * Private MSS data that is necessary to be able to do transmuxing.
  575. * @property {boolean} external
  576. * Indicate if the stream was added externally.
  577. * Eg: external text tracks.
  578. * @property {boolean} fastSwitching
  579. * Indicate if the stream should be used for fast switching.
  580. * @property {!Set.<string>} fullMimeTypes
  581. * A set of full MIME types (e.g. MIME types plus codecs information), that
  582. * represents the types used in each period of the original manifest.
  583. * Meant for being used by compatibility checking, such as with
  584. * MediaSource.isTypeSupported.
  585. *
  586. * @exportDoc
  587. */
  588. shaka.extern.Stream;
  589. /**
  590. * @typedef {{
  591. * duration: number,
  592. * timescale: number,
  593. * codecPrivateData: ?string
  594. * }}
  595. *
  596. * @description
  597. * Private MSS data that is necessary to be able to do transmuxing.
  598. *
  599. * @property {number} duration
  600. * <i>Required.</i> <br>
  601. * MSS Stream duration.
  602. * @property {number} timescale
  603. * <i>Required.</i> <br>
  604. * MSS timescale.
  605. * @property {?string} codecPrivateData
  606. * MSS codecPrivateData.
  607. *
  608. * @exportDoc
  609. */
  610. shaka.extern.MssPrivateData;