shaka-player 4.12.8 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/AUTHORS +1 -0
  2. package/CONTRIBUTORS +4 -0
  3. package/README.md +22 -21
  4. package/cspell.config.yaml +18 -0
  5. package/dist/controls.css +1 -1
  6. package/dist/controls.css.map +1 -1
  7. package/dist/deps.js +29 -24
  8. package/dist/locales.js +33 -33
  9. package/dist/shaka-player.compiled.d.ts +138 -36
  10. package/dist/shaka-player.compiled.debug.d.ts +138 -36
  11. package/dist/shaka-player.compiled.debug.externs.js +367 -107
  12. package/dist/shaka-player.compiled.debug.js +828 -765
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +367 -107
  15. package/dist/shaka-player.compiled.js +1451 -1416
  16. package/dist/shaka-player.compiled.map +4 -4
  17. package/dist/shaka-player.ui.d.ts +172 -38
  18. package/dist/shaka-player.ui.debug.d.ts +172 -38
  19. package/dist/shaka-player.ui.debug.externs.js +406 -113
  20. package/dist/shaka-player.ui.debug.js +842 -766
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +406 -113
  23. package/dist/shaka-player.ui.js +1670 -1628
  24. package/dist/shaka-player.ui.map +4 -4
  25. package/eslint.config.mjs +343 -0
  26. package/externs/airplay.js +1 -1
  27. package/externs/audiotrack.js +1 -1
  28. package/externs/awesomplete.js +1 -1
  29. package/externs/cast-sdk-v2.js +2 -2
  30. package/externs/cmcd.js +16 -1
  31. package/externs/device_sensor_event.js +1 -1
  32. package/externs/ima.js +8 -8
  33. package/externs/isoboxer.js +31 -31
  34. package/externs/jwk_set.js +1 -1
  35. package/externs/lcevc.js +8 -8
  36. package/externs/mediakeys.js +1 -1
  37. package/externs/mediasession.js +3 -2
  38. package/externs/mediatailor.js +18 -18
  39. package/externs/pictureinpicture.js +41 -1
  40. package/externs/playstation.js +2 -2
  41. package/externs/prefixed_eme.js +1 -1
  42. package/externs/shaka/abortable.js +4 -4
  43. package/externs/shaka/abr_manager.js +1 -1
  44. package/externs/shaka/ads.js +45 -6
  45. package/externs/shaka/cea.js +2 -2
  46. package/externs/shaka/codecs.js +4 -4
  47. package/externs/shaka/drm_info.js +6 -6
  48. package/externs/shaka/error.js +5 -5
  49. package/externs/shaka/manifest.js +51 -56
  50. package/externs/shaka/manifest_parser.js +3 -9
  51. package/externs/shaka/net.js +23 -20
  52. package/externs/shaka/offline.js +37 -37
  53. package/externs/shaka/offline_compat_v1.js +10 -10
  54. package/externs/shaka/offline_compat_v2.js +10 -10
  55. package/externs/shaka/player.js +139 -109
  56. package/externs/shaka/text.js +10 -3
  57. package/externs/shaka/transmuxer.js +1 -1
  58. package/externs/videotrack.js +1 -1
  59. package/lib/abr/ewma.js +1 -1
  60. package/lib/abr/simple_abr_manager.js +70 -22
  61. package/lib/ads/ad_manager.js +43 -18
  62. package/lib/ads/ad_utils.js +160 -58
  63. package/lib/ads/ads_stats.js +1 -1
  64. package/lib/ads/client_side_ad_manager.js +2 -2
  65. package/lib/ads/interstitial_ad.js +16 -11
  66. package/lib/ads/interstitial_ad_manager.js +419 -72
  67. package/lib/ads/interstitial_static_ad.js +299 -0
  68. package/lib/ads/media_tailor_ad.js +1 -0
  69. package/lib/ads/media_tailor_ad_manager.js +37 -36
  70. package/lib/ads/server_side_ad_manager.js +7 -6
  71. package/lib/cast/cast_receiver.js +5 -3
  72. package/lib/cast/cast_sender.js +2 -2
  73. package/lib/cast/cast_utils.js +20 -13
  74. package/lib/cea/cea608_data_channel.js +53 -53
  75. package/lib/cea/cea708_service.js +42 -40
  76. package/lib/cea/cea708_window.js +5 -2
  77. package/lib/cea/cea_decoder.js +5 -7
  78. package/lib/cea/mp4_cea_parser.js +1 -1
  79. package/lib/cea/sei_processor.js +1 -1
  80. package/lib/dash/content_protection.js +62 -192
  81. package/lib/dash/dash_parser.js +119 -119
  82. package/lib/dash/mpd_utils.js +14 -13
  83. package/lib/dash/segment_base.js +5 -5
  84. package/lib/dash/segment_list.js +10 -10
  85. package/lib/dash/segment_template.js +55 -53
  86. package/lib/debug/log.js +2 -2
  87. package/lib/dependencies/all.js +2 -1
  88. package/lib/{media → drm}/drm_engine.js +274 -143
  89. package/lib/{util → drm}/drm_utils.js +20 -11
  90. package/lib/drm/playready.js +233 -0
  91. package/lib/hls/hls_classes.js +14 -14
  92. package/lib/hls/hls_parser.js +257 -196
  93. package/lib/hls/hls_utils.js +14 -14
  94. package/lib/hls/manifest_text_parser.js +10 -10
  95. package/lib/media/adaptation_set.js +6 -5
  96. package/lib/media/adaptation_set_criteria.js +51 -379
  97. package/lib/media/buffering_observer.js +5 -4
  98. package/lib/media/closed_caption_parser.js +2 -2
  99. package/lib/media/content_workarounds.js +2 -2
  100. package/lib/media/example_based_criteria.js +69 -0
  101. package/lib/media/gap_jumping_controller.js +14 -1
  102. package/lib/media/manifest_filterer.js +8 -8
  103. package/lib/media/manifest_parser.js +2 -2
  104. package/lib/media/media_source_capabilities.js +20 -1
  105. package/lib/media/media_source_engine.js +84 -35
  106. package/lib/media/mp4_segment_index_parser.js +5 -5
  107. package/lib/media/playhead.js +2 -8
  108. package/lib/media/playhead_observer.js +1 -1
  109. package/lib/media/preference_based_criteria.js +333 -0
  110. package/lib/media/preload_manager.js +53 -37
  111. package/lib/media/presentation_timeline.js +2 -2
  112. package/lib/media/quality_observer.js +35 -35
  113. package/lib/media/region_observer.js +2 -2
  114. package/lib/media/region_timeline.js +3 -3
  115. package/lib/media/segment_index.js +14 -14
  116. package/lib/media/segment_prefetch.js +17 -13
  117. package/lib/media/segment_reference.js +7 -7
  118. package/lib/media/segment_utils.js +9 -9
  119. package/lib/media/streaming_engine.js +77 -38
  120. package/lib/media/time_ranges_utils.js +1 -1
  121. package/lib/media/video_wrapper.js +1 -1
  122. package/lib/media/webm_segment_index_parser.js +4 -4
  123. package/lib/mss/content_protection.js +17 -222
  124. package/lib/mss/mss_parser.js +23 -24
  125. package/lib/net/data_uri_plugin.js +1 -0
  126. package/lib/net/http_fetch_plugin.js +8 -7
  127. package/lib/net/http_plugin_utils.js +5 -2
  128. package/lib/net/http_xhr_plugin.js +4 -3
  129. package/lib/net/networking_engine.js +72 -17
  130. package/lib/net/networking_utils.js +5 -2
  131. package/lib/offline/download_info.js +5 -1
  132. package/lib/offline/download_manager.js +15 -4
  133. package/lib/offline/download_progress_estimator.js +1 -1
  134. package/lib/offline/indexeddb/base_storage_cell.js +9 -9
  135. package/lib/offline/indexeddb/db_connection.js +1 -1
  136. package/lib/offline/indexeddb/db_operation.js +2 -2
  137. package/lib/offline/indexeddb/eme_session_storage_cell.js +1 -1
  138. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  139. package/lib/offline/indexeddb/v1_storage_cell.js +3 -3
  140. package/lib/offline/indexeddb/v2_storage_cell.js +2 -2
  141. package/lib/offline/manifest_converter.js +11 -12
  142. package/lib/offline/offline_scheme.js +8 -4
  143. package/lib/offline/session_deleter.js +11 -11
  144. package/lib/offline/storage.js +137 -88
  145. package/lib/offline/storage_muxer.js +8 -8
  146. package/lib/offline/stored_content_utils.js +3 -3
  147. package/lib/offline/stream_bandwidth_estimator.js +1 -1
  148. package/lib/player.js +291 -207
  149. package/lib/polyfill/all.js +1 -1
  150. package/lib/polyfill/media_capabilities.js +5 -5
  151. package/lib/polyfill/patchedmediakeys_apple.js +6 -6
  152. package/lib/polyfill/patchedmediakeys_webkit.js +8 -8
  153. package/lib/polyfill/video_play_promise.js +0 -1
  154. package/lib/text/cue.js +3 -2
  155. package/lib/text/lrc_text_parser.js +1 -1
  156. package/lib/text/mp4_ttml_parser.js +1 -1
  157. package/lib/text/mp4_vtt_parser.js +3 -3
  158. package/lib/text/sbv_text_parser.js +1 -1
  159. package/lib/text/simple_text_displayer.js +37 -10
  160. package/lib/text/ssa_text_parser.js +3 -1
  161. package/lib/text/stub_text_displayer.js +12 -5
  162. package/lib/text/text_engine.js +5 -4
  163. package/lib/text/text_utils.js +4 -4
  164. package/lib/text/ttml_text_parser.js +21 -20
  165. package/lib/text/ui_text_displayer.js +20 -13
  166. package/lib/text/vtt_text_parser.js +10 -10
  167. package/lib/text/web_vtt_generator.js +2 -2
  168. package/lib/transmuxer/aac_transmuxer.js +2 -2
  169. package/lib/transmuxer/ac3_transmuxer.js +2 -2
  170. package/lib/transmuxer/adts.js +2 -0
  171. package/lib/transmuxer/ec3.js +3 -3
  172. package/lib/transmuxer/ec3_transmuxer.js +2 -2
  173. package/lib/transmuxer/h264.js +5 -5
  174. package/lib/transmuxer/h265.js +3 -3
  175. package/lib/transmuxer/mp3_transmuxer.js +2 -2
  176. package/lib/transmuxer/mpeg_audio.js +6 -6
  177. package/lib/transmuxer/mss_transmuxer.js +2 -0
  178. package/lib/transmuxer/transmuxer_engine.js +1 -1
  179. package/lib/transmuxer/ts_transmuxer.js +10 -10
  180. package/lib/util/abortable_operation.js +10 -10
  181. package/lib/util/array_utils.js +6 -6
  182. package/lib/util/cmcd_manager.js +149 -18
  183. package/lib/util/cmsd_manager.js +11 -11
  184. package/lib/util/config_utils.js +3 -3
  185. package/lib/util/content_steering_manager.js +17 -17
  186. package/lib/util/data_view_reader.js +3 -3
  187. package/lib/util/ebml_parser.js +1 -1
  188. package/lib/util/error.js +11 -6
  189. package/lib/util/event_manager.js +1 -1
  190. package/lib/util/exp_golomb.js +1 -1
  191. package/lib/util/fairplay_utils.js +6 -1
  192. package/lib/util/fake_event.js +3 -2
  193. package/lib/util/fake_event_target.js +1 -1
  194. package/lib/util/functional.js +8 -8
  195. package/lib/util/id3_utils.js +1 -1
  196. package/lib/util/iterables.js +6 -6
  197. package/lib/util/language_utils.js +17 -17
  198. package/lib/util/manifest_parser_utils.js +13 -13
  199. package/lib/util/map_utils.js +6 -6
  200. package/lib/util/media_ready_state_utils.js +1 -1
  201. package/lib/util/mime_utils.js +15 -4
  202. package/lib/util/mp4_box_parsers.js +5 -5
  203. package/lib/util/mp4_generator.js +31 -30
  204. package/lib/util/mp4_parser.js +2 -2
  205. package/lib/util/multi_map.js +5 -5
  206. package/lib/util/mutex.js +1 -1
  207. package/lib/util/networking.js +1 -1
  208. package/lib/util/object_utils.js +5 -1
  209. package/lib/util/operation_manager.js +1 -1
  210. package/lib/util/periods.js +24 -24
  211. package/lib/util/platform.js +8 -4
  212. package/lib/util/player_configuration.js +50 -17
  213. package/lib/util/pssh.js +34 -6
  214. package/lib/util/public_promise.js +2 -2
  215. package/lib/util/state_history.js +2 -2
  216. package/lib/util/stream_utils.js +138 -120
  217. package/lib/util/string_utils.js +4 -3
  218. package/lib/util/switch_history.js +2 -2
  219. package/lib/util/tXml.js +22 -17
  220. package/lib/util/text_parser.js +2 -2
  221. package/lib/util/timer.js +1 -1
  222. package/lib/util/ts_parser.js +22 -22
  223. package/lib/util/xml_utils.js +1 -0
  224. package/package.json +7 -4
  225. package/project-words.txt +485 -0
  226. package/shaka-player.uncompiled.js +1 -1
  227. package/third_party/closure-uri/uri.js +2 -2
  228. package/third_party/closure-uri/utils.js +2 -2
  229. package/third_party/language-mapping-list/language-mapping-list.js +1 -1
  230. package/ui/ad_statistics_button.js +9 -5
  231. package/ui/airplay_button.js +1 -0
  232. package/ui/audio_language_selection.js +2 -1
  233. package/ui/context_menu.js +2 -2
  234. package/ui/controls.js +7 -7
  235. package/ui/externs/ui.js +29 -21
  236. package/ui/externs/watermark.js +64 -0
  237. package/ui/fast_forward_button.js +1 -1
  238. package/ui/gl_matrix/matrix_4x4.js +11 -5
  239. package/ui/hidden_fast_forward_button.js +1 -1
  240. package/ui/hidden_seek_button.js +1 -1
  241. package/ui/language_utils.js +27 -26
  242. package/ui/less/buttons.less +2 -2
  243. package/ui/localization.js +21 -21
  244. package/ui/loop_button.js +2 -2
  245. package/ui/overflow_menu.js +2 -2
  246. package/ui/playback_rate_selection.js +1 -1
  247. package/ui/presentation_time.js +4 -1
  248. package/ui/range_element.js +2 -2
  249. package/ui/resolution_selection.js +42 -6
  250. package/ui/rewind_button.js +1 -1
  251. package/ui/seek_bar.js +5 -5
  252. package/ui/statistics_button.js +8 -4
  253. package/ui/text_selection.js +3 -2
  254. package/ui/ui.js +32 -2
  255. package/ui/vr_manager.js +3 -3
  256. package/ui/vr_utils.js +14 -14
  257. package/ui/vr_webgl.js +5 -5
  258. package/ui/watermark.js +313 -0
  259. package/.eslintignore +0 -4
  260. package/.eslintrc.js +0 -310
  261. package/lib/polyfill/patchedmediakeys_nop.js +0 -148
@@ -172,7 +172,7 @@ shaka.util.BufferUtils = class {
172
172
  * The IClosedCaptionParser defines the interface to provide all operations for
173
173
  * parsing the closed captions embedded in Dash videos streams.
174
174
  * TODO: Remove this interface and move method definitions
175
- * directly to ClosedCaptonParser.
175
+ * directly to ClosedCaptionParser.
176
176
  * @interface
177
177
  */
178
178
  shaka.media.IClosedCaptionParser = class {
@@ -480,6 +480,7 @@ shaka.util.Error.Code = {
480
480
  'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
481
481
  'MIN_HDCP_VERSION_NOT_MATCH': 6018,
482
482
  'ERROR_CHECKING_HDCP_VERSION': 6019,
483
+ 'MISSING_EME_SUPPORT': 6020,
483
484
  'LOAD_INTERRUPTED': 7000,
484
485
  'OPERATION_ABORTED': 7001,
485
486
  'NO_VIDEO_ELEMENT': 7002,
@@ -790,7 +791,7 @@ shaka.text.Cue.prototype.textCombineUpright;
790
791
  /**
791
792
  * Text decoration. A combination of underline, overline
792
793
  * and line through. Empty array means no decoration.
793
- * @type {!Array.<!shaka.text.Cue.textDecoration>}
794
+ * @type {!Array<!shaka.text.Cue.textDecoration>}
794
795
  */
795
796
  shaka.text.Cue.prototype.textDecoration;
796
797
  /**
@@ -822,7 +823,7 @@ shaka.text.Cue.prototype.id;
822
823
  * Nested cues, which should be laid out horizontally in one block.
823
824
  * Top-level cues are blocks, and nested cues are inline elements.
824
825
  * Cues can be nested arbitrarily deeply.
825
- * @type {!Array.<!shaka.text.Cue>}
826
+ * @type {!Array<!shaka.text.Cue>}
826
827
  */
827
828
  shaka.text.Cue.prototype.nestedCues;
828
829
  /**
@@ -1248,7 +1249,7 @@ shaka.util.LanguageUtils = class {
1248
1249
  * Find the locale in |searchSpace| that comes closest to |target|. If no
1249
1250
  * locale is found to be close to |target|, then |null| will be returned.
1250
1251
  * @param {string} target
1251
- * @param {!Iterable.<string>} searchSpace
1252
+ * @param {!Iterable<string>} searchSpace
1252
1253
  * @return {?string}
1253
1254
  */
1254
1255
  static findClosestLocale(target, searchSpace) {}
@@ -1366,30 +1367,23 @@ shaka.config.AutoShowText = {
1366
1367
  'IF_PREFERRED_TEXT_LANGUAGE': 2,
1367
1368
  'IF_SUBTITLES_MAY_BE_NEEDED': 3
1368
1369
  };
1369
- /**
1370
- * @enum {string}
1371
- */
1372
- shaka.config.CodecSwitchingStrategy = {
1373
- 'RELOAD': 'reload',
1374
- 'SMOOTH': 'smooth'
1375
- };
1376
1370
  /**
1377
1371
  * A utility to wrap abortable operations. Note that these are not cancelable.
1378
- * Cancelation implies undoing what has been done so far, whereas aborting only
1372
+ * Cancellation implies undoing what has been done so far, whereas aborting only
1379
1373
  * means that further work is stopped.
1380
- * @implements {shaka.extern.IAbortableOperation.<T>}
1374
+ * @implements {shaka.extern.IAbortableOperation<T>}
1381
1375
  * @template T
1382
1376
  */
1383
1377
  shaka.util.AbortableOperation = class {
1384
1378
  /**
1385
- * @param {!Promise.<T>} promise
1379
+ * @param {!Promise<T>} promise
1386
1380
  * A Promise which represents the underlying operation. It is resolved when
1387
1381
  * the operation is complete, and rejected if the operation fails or is
1388
1382
  * aborted. Aborted operations should be rejected with a shaka.util.Error
1389
1383
  * object using the error code OPERATION_ABORTED.
1390
1384
  * @param {function():!Promise} onAbort
1391
1385
  * Will be called by this object to abort the underlying operation.
1392
- * This is not cancelation, and will not necessarily result in any work
1386
+ * This is not cancellation, and will not necessarily result in any work
1393
1387
  * being undone. abort() should return a Promise which is resolved when the
1394
1388
  * underlying operation has been aborted. The returned Promise should never
1395
1389
  * be rejected.
@@ -1418,7 +1412,7 @@ shaka.util.AbortableOperation = class {
1418
1412
  */
1419
1413
  static completed(value) {}
1420
1414
  /**
1421
- * @param {!Promise.<U>} promise
1415
+ * @param {!Promise<U>} promise
1422
1416
  * @return {!shaka.util.AbortableOperation.<U>} An operation which cannot be
1423
1417
  * aborted. It will be completed when the given Promise is resolved, or
1424
1418
  * will be failed when the given Promise is rejected.
@@ -1430,7 +1424,7 @@ shaka.util.AbortableOperation = class {
1430
1424
  */
1431
1425
  abort() {}
1432
1426
  /**
1433
- * @param {!Array.<!shaka.util.AbortableOperation>} operations
1427
+ * @param {!Array<!shaka.util.AbortableOperation>} operations
1434
1428
  * @return {!shaka.util.AbortableOperation} An operation which is resolved
1435
1429
  * when all operations are successful and fails when any operation fails.
1436
1430
  * For this operation, abort() aborts all given operations.
@@ -1443,7 +1437,7 @@ shaka.util.AbortableOperation = class {
1443
1437
  /**
1444
1438
  * @param {(undefined|
1445
1439
  * function(T):U|
1446
- * function(T):!Promise.<U>|
1440
+ * function(T):!Promise<U>|
1447
1441
  * function(T):!shaka.util.AbortableOperation.<U>)} onSuccess
1448
1442
  * A callback to be invoked after this operation is complete, to chain to
1449
1443
  * another operation. The callback can return a plain value, a Promise to
@@ -1460,7 +1454,7 @@ shaka.util.AbortableOperation = class {
1460
1454
  chain(onSuccess, onError) {}
1461
1455
  };
1462
1456
  /**
1463
- * @const {!Promise.<T>}
1457
+ * @const {!Promise<T>}
1464
1458
  */
1465
1459
  shaka.util.AbortableOperation.prototype.promise;
1466
1460
  /**
@@ -1471,7 +1465,7 @@ shaka.util.AbortableOperation.prototype.promise;
1471
1465
  shaka.util.FakeEvent = class {
1472
1466
  /**
1473
1467
  * @param {string} type
1474
- * @param {Map.<string, Object>=} dict
1468
+ * @param {Map<string, Object>=} dict
1475
1469
  */
1476
1470
  constructor(type, dict) {}
1477
1471
  };
@@ -1543,6 +1537,8 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1543
1537
  * of whether the switching is allowed.
1544
1538
  * @param {shaka.net.NetworkingEngine.OnHeadersReceived=} onHeadersReceived
1545
1539
  * Called when the headers are received for a download.
1540
+ * @param {shaka.net.NetworkingEngine.OnDownloadCompleted=
1541
+ * } onDownloadCompleted Called when a download completed successfully.
1546
1542
  * @param {shaka.net.NetworkingEngine.OnDownloadFailed=} onDownloadFailed
1547
1543
  * Called when a download fails, for any reason.
1548
1544
  * @param {shaka.net.NetworkingEngine.OnRequest=} onRequest
@@ -1552,7 +1548,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1552
1548
  * @param {shaka.net.NetworkingEngine.OnResponse=} onResponse
1553
1549
  * Called when receive the response
1554
1550
  */
1555
- constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
1551
+ constructor(onProgressUpdated, onHeadersReceived, onDownloadCompleted, onDownloadFailed, onRequest, onRetry, onResponse) {}
1556
1552
  /**
1557
1553
  * @param {boolean} forceHTTP
1558
1554
  */
@@ -1608,6 +1604,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1608
1604
  * Clears all response filters.
1609
1605
  */
1610
1606
  clearAllResponseFilters() {}
1607
+ /**
1608
+ * Clears Common Access Token map.
1609
+ */
1610
+ clearCommonAccessTokenMap() {}
1611
1611
  /**
1612
1612
  * Gets a copy of the default retry parameters.
1613
1613
  * @return {shaka.extern.RetryParameters}
@@ -1617,7 +1617,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1617
1617
  static defaultRetryParameters() {}
1618
1618
  /**
1619
1619
  * Makes a simple network request for the given URIs.
1620
- * @param {!Array.<string>} uris
1620
+ * @param {!Array<string>} uris
1621
1621
  * @param {shaka.extern.RetryParameters} retryParams
1622
1622
  * @param {?function(BufferSource):!Promise=} streamDataCallback
1623
1623
  * @return {shaka.extern.Request}
@@ -1664,12 +1664,12 @@ shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOp
1664
1664
  * shaka.util.Error object using the error code OPERATION_ABORTED.
1665
1665
  * @param {function():!Promise} onAbort
1666
1666
  * Will be called by this object to abort the underlying operation. This
1667
- * is not cancelation, and will not necessarily result in any work being
1667
+ * is not cancellation, and will not necessarily result in any work being
1668
1668
  * undone. abort() should return a Promise which is resolved when the
1669
1669
  * underlying operation has been aborted. The returned Promise should
1670
1670
  * never be rejected.
1671
- * @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
1672
- * numBytesRemainingObj
1671
+ * @param {shaka.net.NetworkingEngine.NumBytesRemainingClass
1672
+ * } numBytesRemainingObj
1673
1673
  */
1674
1674
  constructor(promise, onAbort, numBytesRemainingObj) {}
1675
1675
  };
@@ -1724,7 +1724,7 @@ shaka.net.NetworkingEngine.PluginPriority = {
1724
1724
  };
1725
1725
  /**
1726
1726
  * @typedef {function(
1727
- * !Object.<string, string>,
1727
+ * !Object<string, string>,
1728
1728
  * !shaka.extern.Request,
1729
1729
  * !shaka.net.NetworkingEngine.RequestType)}
1730
1730
  * @description
@@ -1745,6 +1745,15 @@ shaka.net.NetworkingEngine.OnHeadersReceived;
1745
1745
  * original request.
1746
1746
  */
1747
1747
  shaka.net.NetworkingEngine.onProgressUpdated;
1748
+ /**
1749
+ * @typedef {function(
1750
+ * !shaka.extern.Request,
1751
+ * !shaka.extern.Response)}
1752
+ * @description
1753
+ * A callback function that notifies the player when a download completed
1754
+ * successfully.
1755
+ */
1756
+ shaka.net.NetworkingEngine.OnDownloadCompleted;
1748
1757
  /**
1749
1758
  * @typedef {function(
1750
1759
  * !shaka.extern.Request,
@@ -1786,8 +1795,8 @@ shaka.net.NetworkingEngine.OnRetry;
1786
1795
  */
1787
1796
  shaka.net.NetworkingEngine.OnResponse;
1788
1797
  /**
1789
- * @summary DataViewReader abstracts a DataView object.
1790
- */
1798
+ * @summary DataViewReader abstracts a DataView object.
1799
+ */
1791
1800
  shaka.util.DataViewReader = class {
1792
1801
  /**
1793
1802
  * @param {BufferSource} data
@@ -1971,6 +1980,91 @@ shaka.util.Mp4Parser = class {
1971
1980
  * @typedef {function(!shaka.extern.ParsedBox)}
1972
1981
  */
1973
1982
  shaka.util.Mp4Parser.CallbackType;
1983
+ /**
1984
+ * A set of variants that we want to adapt between.
1985
+ * @final
1986
+ */
1987
+ shaka.media.AdaptationSet = class {
1988
+ /**
1989
+ * @param {shaka.extern.Variant} root
1990
+ * The variant that all other variants will be tested against when being
1991
+ * added to the adaptation set. If a variant is not compatible with the
1992
+ * root, it will not be added.
1993
+ * @param {!Iterable<shaka.extern.Variant>=} candidates
1994
+ * Variants that may be compatible with the root and should be added if
1995
+ * compatible. If a candidate is not compatible, it will not end up in the
1996
+ * adaptation set.
1997
+ * @param {boolean=} compareCodecs
1998
+ */
1999
+ constructor(root, candidates, compareCodecs) {}
2000
+ };
2001
+ /**
2002
+ * @enum {string}
2003
+ */
2004
+ shaka.config.CodecSwitchingStrategy = {
2005
+ 'RELOAD': 'reload',
2006
+ 'SMOOTH': 'smooth'
2007
+ };
2008
+ /**
2009
+ * An adaptation set criteria is a unit of logic that can take a set of
2010
+ * variants and return a subset of variants that should (and can) be
2011
+ * adapted between.
2012
+ * @interface
2013
+ */
2014
+ shaka.media.AdaptationSetCriteria = class {
2015
+ /**
2016
+ * Take a set of variants, and return a subset of variants that can be
2017
+ * adapted between.
2018
+ * @param {!Array<shaka.extern.Variant>} variants
2019
+ * @return {!shaka.media.AdaptationSet}
2020
+ */
2021
+ create(variants) {}
2022
+ /**
2023
+ * Sets the AdaptationSetCriteria configuration.
2024
+ * @param {shaka.media.AdaptationSetCriteria.Configuration} config
2025
+ */
2026
+ configure(config) {}
2027
+ };
2028
+ /**
2029
+ * A factory for creating the AdaptationSetCriteria.
2030
+ * @typedef {function():!shaka.media.AdaptationSetCriteria}
2031
+ */
2032
+ shaka.media.AdaptationSetCriteria.Factory;
2033
+ /**
2034
+ * @typedef {{
2035
+ * language: string,
2036
+ * role: string,
2037
+ * channelCount: number,
2038
+ * hdrLevel: string,
2039
+ * spatialAudio: boolean,
2040
+ * videoLayout: string,
2041
+ * audioLabel: string,
2042
+ * videoLabel: string,
2043
+ * codecSwitchingStrategy: shaka.config.CodecSwitchingStrategy,
2044
+ * audioCodec: string
2045
+ * }}
2046
+ * @property {string} language
2047
+ * The language used to filter variants.
2048
+ * @property {string} role
2049
+ * The adaptation role used to filter variants.
2050
+ * @property {string} channelCount
2051
+ * The audio channel count used to filter variants.
2052
+ * @property {string} hdrLevel
2053
+ * The HDR level used to filter variants.
2054
+ * @property {boolean} spatialAudio
2055
+ * Whether should prefer audio tracks with spatial audio.
2056
+ * @property {string} videoLayout
2057
+ * The video layout used to filter variants.
2058
+ * @property {string} audioLabel
2059
+ * The audio label used to filter variants.
2060
+ * @property {string} videoLabel
2061
+ * The video label used to filter variants.
2062
+ * @property {shaka.config.CodecSwitchingStrategy} codecSwitchingStrategy
2063
+ * The codec switching strategy used to filter variants.
2064
+ * @property {string} audioCodec
2065
+ * The audio codec used to filter variants.
2066
+ */
2067
+ shaka.media.AdaptationSetCriteria.Configuration;
1974
2068
  /**
1975
2069
  * @summary An interface to register manifest parsers.
1976
2070
  */
@@ -2008,7 +2102,7 @@ shaka.media.ManifestParser.AccessibilityPurpose = {
2008
2102
  */
2009
2103
  shaka.media.InitSegmentReference = class {
2010
2104
  /**
2011
- * @param {function():!Array.<string>} uris A function that creates the URIs
2105
+ * @param {function(): !Array<string>} uris A function that creates the URIs
2012
2106
  * of the resource containing the segment.
2013
2107
  * @param {number} startByte The offset from the start of the resource to the
2014
2108
  * start of the segment.
@@ -2047,7 +2141,7 @@ shaka.media.SegmentReference = class {
2047
2141
  * @param {number} endTime The segment's end time in seconds. The segment
2048
2142
  * ends the instant before this time, so |endTime| must be strictly greater
2049
2143
  * than |startTime|.
2050
- * @param {function():!Array.<string>} uris
2144
+ * @param {function(): !Array<string>} uris
2051
2145
  * A function that creates the URIs of the resource containing the segment.
2052
2146
  * @param {number} startByte The offset from the start of the resource to the
2053
2147
  * start of the segment.
@@ -2078,7 +2172,7 @@ shaka.media.SegmentReference = class {
2078
2172
  * The end of the append window for this reference, relative to the
2079
2173
  * presentation. Any content from after this time will be removed by
2080
2174
  * MediaSource.
2081
- * @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
2175
+ * @param {!Array<!shaka.media.SegmentReference>=} partialReferences
2082
2176
  * A list of SegmentReferences for the partial segments.
2083
2177
  * @param {?string=} tilesLayout
2084
2178
  * The value is a grid-item-dimension consisting of two positive decimal
@@ -2103,7 +2197,7 @@ shaka.media.SegmentReference = class {
2103
2197
  constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, aesKey, allPartialSegments) {}
2104
2198
  /**
2105
2199
  * Creates and returns the URIs of the resource containing the segment.
2106
- * @return {!Array.<string>}
2200
+ * @return {!Array<string>}
2107
2201
  */
2108
2202
  getUris() {}
2109
2203
  /**
@@ -2271,7 +2365,7 @@ shaka.util.Id3Utils = class {
2271
2365
  /**
2272
2366
  * Returns an array of ID3 frames found in all the ID3 tags in the id3Data
2273
2367
  * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags
2274
- * @return {!Array.<shaka.extern.MetadataFrame>}
2368
+ * @return {!Array<shaka.extern.MetadataFrame>}
2275
2369
  */
2276
2370
  static getID3Frames(id3Data) {}
2277
2371
  /**
@@ -2285,7 +2379,7 @@ shaka.util.Id3Utils = class {
2285
2379
  };
2286
2380
  /**
2287
2381
  * @summary
2288
- * Parser for exponential Golomb codes, a variable-bitwidth number encoding
2382
+ * Parser for exponential Golomb codes, a variable-bit width number encoding
2289
2383
  * scheme used by h264.
2290
2384
  * Based on https://github.com/videojs/mux.js/blob/main/lib/utils/exp-golomb.js
2291
2385
  */
@@ -2318,7 +2412,7 @@ shaka.util.TsParser = class {
2318
2412
  * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2319
2413
  * @param {shaka.extern.MPEG_PES} pes
2320
2414
  * @param {?shaka.extern.MPEG_PES=} nextPes
2321
- * @return {!Array.<shaka.extern.VideoNalu>}
2415
+ * @return {!Array<shaka.extern.VideoNalu>}
2322
2416
  */
2323
2417
  parseAvcNalus(pes, nextPes) {}
2324
2418
  /**
@@ -2327,23 +2421,23 @@ shaka.util.TsParser = class {
2327
2421
  * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2328
2422
  * @param {shaka.extern.MPEG_PES} pes
2329
2423
  * @param {{nalu: ?shaka.extern.VideoNalu, state: ?number}} lastInfo
2330
- * @return {!Array.<shaka.extern.VideoNalu>}
2424
+ * @return {!Array<shaka.extern.VideoNalu>}
2331
2425
  */
2332
2426
  parseNalus(pes, lastInfo) {}
2333
2427
  /**
2334
2428
  * Return the ID3 metadata
2335
- * @return {!Array.<shaka.extern.ID3Metadata>}
2429
+ * @return {!Array<shaka.extern.ID3Metadata>}
2336
2430
  */
2337
2431
  getMetadata() {}
2338
2432
  /**
2339
2433
  * Return the audio data
2340
- * @return {!Array.<shaka.extern.MPEG_PES>}
2434
+ * @return {!Array<shaka.extern.MPEG_PES>}
2341
2435
  */
2342
2436
  getAudioData() {}
2343
2437
  /**
2344
2438
  * Return the video data
2345
2439
  * @param {boolean=} naluProcessing
2346
- * @return {!Array.<shaka.extern.MPEG_PES>}
2440
+ * @return {!Array<shaka.extern.MPEG_PES>}
2347
2441
  */
2348
2442
  getVideoData(naluProcessing) {}
2349
2443
  /**
@@ -2359,7 +2453,7 @@ shaka.util.TsParser = class {
2359
2453
  getCodecs() {}
2360
2454
  /**
2361
2455
  * Return the video data
2362
- * @return {!Array.<shaka.extern.VideoNalu>}
2456
+ * @return {!Array<shaka.extern.VideoNalu>}
2363
2457
  */
2364
2458
  getVideoNalus() {}
2365
2459
  /**
@@ -2492,7 +2586,7 @@ shaka.media.PresentationTimeline = class {
2492
2586
  * Gives PresentationTimeline a Stream's timeline so it can size and position
2493
2587
  * the segment availability window, and account for missing segment
2494
2588
  * information.
2495
- * @param {!Array.<shaka.media.PresentationTimeline.TimeRange>} timeline
2589
+ * @param {!Array<shaka.media.PresentationTimeline.TimeRange>} timeline
2496
2590
  * @param {number} startOffset
2497
2591
  */
2498
2592
  notifyTimeRange(timeline, startOffset) {}
@@ -2501,7 +2595,7 @@ shaka.media.PresentationTimeline = class {
2501
2595
  * the segment availability window, and account for missing segment
2502
2596
  * information. These segments do not necessarily need to all be from the
2503
2597
  * same stream.
2504
- * @param {!Array.<!shaka.media.SegmentReference>} references
2598
+ * @param {!Array<!shaka.media.SegmentReference>} references
2505
2599
  */
2506
2600
  notifySegments(references) {}
2507
2601
  /**
@@ -2663,11 +2757,11 @@ shaka.media.PresentationTimeline.TimeRange;
2663
2757
  * SegmentIndex.
2664
2758
  * @implements {shaka.extern.SegmentIndex}
2665
2759
  * @implements {shaka.util.IReleasable}
2666
- * @implements {Iterable.<!shaka.media.SegmentReference>}
2760
+ * @implements {Iterable<!shaka.media.SegmentReference>}
2667
2761
  */
2668
2762
  shaka.media.SegmentIndex = class {
2669
2763
  /**
2670
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2764
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
2671
2765
  * SegmentReferences, which must be sorted first by their start times
2672
2766
  * (ascending) and second by their end times (ascending).
2673
2767
  */
@@ -2712,7 +2806,7 @@ shaka.media.SegmentIndex = class {
2712
2806
  * Used, for example, by the DASH and HLS parser, where manifests may not list
2713
2807
  * all available references, so we must keep available references in memory to
2714
2808
  * fill the availability window.
2715
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2809
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
2716
2810
  * SegmentReferences, which must be sorted first by their start times
2717
2811
  * (ascending) and second by their end times (ascending).
2718
2812
  * @param {number} windowStart The start of the availability window to filter
@@ -2740,7 +2834,7 @@ shaka.media.SegmentIndex = class {
2740
2834
  * Updates the references every so often. Stops when the references list
2741
2835
  * returned by the callback is null.
2742
2836
  * @param {number} interval The interval in seconds.
2743
- * @param {function():Array.<shaka.media.SegmentReference>} updateCallback
2837
+ * @param {function(): Array<shaka.media.SegmentReference>} updateCallback
2744
2838
  */
2745
2839
  updateEvery(interval, updateCallback) {}
2746
2840
  /**
@@ -2754,24 +2848,24 @@ shaka.media.SegmentIndex = class {
2754
2848
  * RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
2755
2849
  * Playlist will contain at least one independent frame."
2756
2850
  * @param {number} time
2757
- * @param {boolean=} allowNonIndepedent
2851
+ * @param {boolean=} allowNonIndependent
2758
2852
  * @param {boolean=} reverse
2759
2853
  * @return {?shaka.media.SegmentIterator}
2760
2854
  */
2761
- getIteratorForTime(time, allowNonIndepedent, reverse) {}
2855
+ getIteratorForTime(time, allowNonIndependent, reverse) {}
2762
2856
  /**
2763
2857
  * Create a SegmentIndex for a single segment of the given start time and
2764
2858
  * duration at the given URIs.
2765
2859
  * @param {number} startTime
2766
2860
  * @param {number} duration
2767
- * @param {!Array.<string>} uris
2861
+ * @param {!Array<string>} uris
2768
2862
  * @return {!shaka.media.SegmentIndex}
2769
2863
  */
2770
2864
  static forSingleSegment(startTime, duration, uris) {}
2771
2865
  };
2772
2866
  /**
2773
2867
  * An iterator over a SegmentIndex's references.
2774
- * @implements {Iterator.<shaka.media.SegmentReference>}
2868
+ * @implements {Iterator<shaka.media.SegmentReference>}
2775
2869
  */
2776
2870
  shaka.media.SegmentIterator = class {
2777
2871
  /**
@@ -2806,7 +2900,7 @@ shaka.media.SegmentIterator = class {
2806
2900
  * Used in constructing multi-Period Streams for DASH.
2807
2901
  * @extends shaka.media.SegmentIndex
2808
2902
  * @implements {shaka.util.IReleasable}
2809
- * @implements {Iterable.<!shaka.media.SegmentReference>}
2903
+ * @implements {Iterable<!shaka.media.SegmentReference>}
2810
2904
  */
2811
2905
  shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
2812
2906
  /** */
@@ -2898,7 +2992,7 @@ shaka.util.ConfigUtils = class {
2898
2992
  shaka.util.FairPlayUtils = class {
2899
2993
  /**
2900
2994
  * Check if FairPlay is supported.
2901
- * @return {!Promise.<boolean>}
2995
+ * @return {!Promise<boolean>}
2902
2996
  */
2903
2997
  static isFairPlaySupported() {}
2904
2998
  /**
@@ -2930,6 +3024,7 @@ shaka.util.FairPlayUtils = class {
2930
3024
  * @param {!Uint8Array} initData
2931
3025
  * @param {string} initDataType
2932
3026
  * @param {?shaka.extern.DrmInfo} drmInfo
3027
+ * @return {!Uint8Array}
2933
3028
  */
2934
3029
  static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
2935
3030
  /**
@@ -2937,6 +3032,7 @@ shaka.util.FairPlayUtils = class {
2937
3032
  * @param {!Uint8Array} initData
2938
3033
  * @param {string} initDataType
2939
3034
  * @param {?shaka.extern.DrmInfo} drmInfo
3035
+ * @return {!Uint8Array}
2940
3036
  */
2941
3037
  static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
2942
3038
  /**
@@ -2944,6 +3040,7 @@ shaka.util.FairPlayUtils = class {
2944
3040
  * @param {!Uint8Array} initData
2945
3041
  * @param {string} initDataType
2946
3042
  * @param {?shaka.extern.DrmInfo} drmInfo
3043
+ * @return {!Uint8Array}
2947
3044
  */
2948
3045
  static conaxInitDataTransform(initData, initDataType, drmInfo) {}
2949
3046
  /**
@@ -2951,6 +3048,7 @@ shaka.util.FairPlayUtils = class {
2951
3048
  * @param {!Uint8Array} initData
2952
3049
  * @param {string} initDataType
2953
3050
  * @param {?shaka.extern.DrmInfo} drmInfo
3051
+ * @return {!Uint8Array}
2954
3052
  */
2955
3053
  static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
2956
3054
  /**
@@ -2997,6 +3095,10 @@ shaka.util.PlayerConfiguration = class {
2997
3095
  * @return {shaka.extern.PlayerConfiguration}
2998
3096
  */
2999
3097
  static createDefault() {}
3098
+ /**
3099
+ * @return {!Object}
3100
+ */
3101
+ static createDefaultForLL() {}
3000
3102
  /**
3001
3103
  * Merges the given configuration changes into the given destination. This
3002
3104
  * uses the default Player configurations as the template.
@@ -3067,11 +3169,15 @@ shaka.text.SimpleTextDisplayer = class {
3067
3169
  * @override
3068
3170
  */
3069
3171
  setTextLanguage(language) {}
3172
+ /**
3173
+ * @override
3174
+ */
3175
+ enableTextDisplayer() {}
3070
3176
  };
3071
3177
  /**
3072
- * A stub text displayer plugin that does nothing
3073
- * @implements {shaka.extern.TextDisplayer}
3074
- */
3178
+ * A stub text displayer plugin that does nothing
3179
+ * @implements {shaka.extern.TextDisplayer}
3180
+ */
3075
3181
  shaka.text.StubTextDisplayer = class {
3076
3182
  /**
3077
3183
  * @override
@@ -3101,6 +3207,10 @@ shaka.text.StubTextDisplayer = class {
3101
3207
  * @override
3102
3208
  */
3103
3209
  setTextLanguage(language) {}
3210
+ /**
3211
+ * @override
3212
+ */
3213
+ enableTextDisplayer() {}
3104
3214
  };
3105
3215
  /**
3106
3216
  * The text displayer plugin for the Shaka Player UI. Can also be used directly
@@ -3143,6 +3253,10 @@ shaka.text.UITextDisplayer = class {
3143
3253
  * @override
3144
3254
  */
3145
3255
  setTextLanguage(language) {}
3256
+ /**
3257
+ * @override
3258
+ */
3259
+ enableTextDisplayer() {}
3146
3260
  };
3147
3261
  /**
3148
3262
  * @summary Manage the conversion to WebVTT.
@@ -3232,7 +3346,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3232
3346
  static registerSupportPlugin(name, callback) {}
3233
3347
  /**
3234
3348
  * Set a factory to create an ad manager during player construction time.
3235
- * This method needs to be called bafore instantiating the Player class.
3349
+ * This method needs to be called before instantiating the Player class.
3236
3350
  * @param {!shaka.extern.IAdManager.Factory} factory
3237
3351
  */
3238
3352
  static setAdManagerFactory(factory) {}
@@ -3251,7 +3365,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3251
3365
  * NOTE: This may show a request to the user for permission.
3252
3366
  * @see https://bit.ly/2ywccmH
3253
3367
  * @param {boolean=} promptsOkay
3254
- * @return {!Promise.<shaka.extern.SupportType>}
3368
+ * @return {!Promise<shaka.extern.SupportType>}
3255
3369
  */
3256
3370
  static probeSupport(promptsOkay) {}
3257
3371
  /**
@@ -3311,7 +3425,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3311
3425
  * When in src= mode, this unloads but does not make a PreloadManager.
3312
3426
  * @param {boolean=} initializeMediaSource
3313
3427
  * @param {boolean=} keepAdManager
3314
- * @return {!Promise.<?shaka.media.PreloadManager>}
3428
+ * @return {!Promise<?shaka.media.PreloadManager>}
3315
3429
  */
3316
3430
  unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3317
3431
  /**
@@ -3323,7 +3437,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3323
3437
  * attached to something else.
3324
3438
  * @param {boolean=} keepAdManager
3325
3439
  * @param {boolean=} saveLivePosition
3326
- * @return {!Promise.<?shaka.media.PreloadManager>}
3440
+ * @return {!Promise<?shaka.media.PreloadManager>}
3327
3441
  */
3328
3442
  detachAndSavePreload(keepAdManager, saveLivePosition) {}
3329
3443
  /**
@@ -3345,7 +3459,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3345
3459
  * <code>undefined</code>, playback will start at the default start time (0
3346
3460
  * for VOD and liveEdge for LIVE).
3347
3461
  * @param {?string=} mimeType
3348
- * @return {!Promise.<?shaka.media.PreloadManager>}
3462
+ * @return {!Promise<?shaka.media.PreloadManager>}
3349
3463
  */
3350
3464
  preload(assetUri, startTime, mimeType) {}
3351
3465
  /**
@@ -3379,6 +3493,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3379
3493
  * there were invalid entries.
3380
3494
  */
3381
3495
  configure(config, value) {}
3496
+ /**
3497
+ * Changes low latency configuration settings on the Player.
3498
+ * @param {!Object} config This object should follow the
3499
+ * {@link shaka.extern.PlayerConfiguration} object. Not all fields
3500
+ * need to be set; unset fields retain their old values.
3501
+ */
3502
+ configurationForLowLatency(config) {}
3382
3503
  /**
3383
3504
  * Return a copy of the current configuration. Modifications of the returned
3384
3505
  * value will not affect the Player's active configuration. You must call
@@ -3386,6 +3507,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3386
3507
  * @return {shaka.extern.PlayerConfiguration}
3387
3508
  */
3388
3509
  getConfiguration() {}
3510
+ /**
3511
+ * Return a copy of the current configuration for low latency.
3512
+ * @return {!Object}
3513
+ */
3514
+ getConfigurationForLowLatency() {}
3389
3515
  /**
3390
3516
  * Return a copy of the current non default configuration. Modifications of
3391
3517
  * the returned value will not affect the Player's active configuration.
@@ -3499,7 +3625,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3499
3625
  getExpiration() {}
3500
3626
  /**
3501
3627
  * Returns the active sessions metadata
3502
- * @return {!Array.<shaka.extern.DrmSessionMetadata>}
3628
+ * @return {!Array<shaka.extern.DrmSessionMetadata>}
3503
3629
  */
3504
3630
  getActiveSessionsMetadata() {}
3505
3631
  /**
@@ -3550,27 +3676,27 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3550
3676
  * Return a list of variant tracks that can be switched to.
3551
3677
  * <p>
3552
3678
  * If the player has not loaded content, this will return an empty list.
3553
- * @return {!Array.<shaka.extern.Track>}
3679
+ * @return {!Array<shaka.extern.Track>}
3554
3680
  */
3555
3681
  getVariantTracks() {}
3556
3682
  /**
3557
3683
  * Return a list of text tracks that can be switched to.
3558
3684
  * <p>
3559
3685
  * If the player has not loaded content, this will return an empty list.
3560
- * @return {!Array.<shaka.extern.Track>}
3686
+ * @return {!Array<shaka.extern.Track>}
3561
3687
  */
3562
3688
  getTextTracks() {}
3563
3689
  /**
3564
3690
  * Return a list of image tracks that can be switched to.
3565
3691
  * If the player has not loaded content, this will return an empty list.
3566
- * @return {!Array.<shaka.extern.Track>}
3692
+ * @return {!Array<shaka.extern.Track>}
3567
3693
  */
3568
3694
  getImageTracks() {}
3569
3695
  /**
3570
3696
  * Returns Thumbnail objects for each thumbnail for a given image track ID.
3571
3697
  * If the player has not loaded content, this will return a null.
3572
3698
  * @param {number} trackId
3573
- * @return {!Promise.<?Array<!shaka.extern.Thumbnail>>}
3699
+ * @return {!Promise<?Array<!shaka.extern.Thumbnail>>}
3574
3700
  */
3575
3701
  getAllThumbnails(trackId) {}
3576
3702
  /**
@@ -3578,7 +3704,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3578
3704
  * If the player has not loaded content, this will return a null.
3579
3705
  * @param {number} trackId
3580
3706
  * @param {number} time
3581
- * @return {!Promise.<?shaka.extern.Thumbnail>}
3707
+ * @return {!Promise<?shaka.extern.Thumbnail>}
3582
3708
  */
3583
3709
  getThumbnails(trackId, time) {}
3584
3710
  /**
@@ -3619,25 +3745,25 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3619
3745
  /**
3620
3746
  * Return a list of audio language-role combinations available. If the
3621
3747
  * player has not loaded any content, this will return an empty list.
3622
- * @return {!Array.<shaka.extern.LanguageRole>}
3748
+ * @return {!Array<shaka.extern.LanguageRole>}
3623
3749
  */
3624
3750
  getAudioLanguagesAndRoles() {}
3625
3751
  /**
3626
3752
  * Return a list of text language-role combinations available. If the player
3627
3753
  * has not loaded any content, this will be return an empty list.
3628
- * @return {!Array.<shaka.extern.LanguageRole>}
3754
+ * @return {!Array<shaka.extern.LanguageRole>}
3629
3755
  */
3630
3756
  getTextLanguagesAndRoles() {}
3631
3757
  /**
3632
3758
  * Return a list of audio languages available. If the player has not loaded
3633
3759
  * any content, this will return an empty list.
3634
- * @return {!Array.<string>}
3760
+ * @return {!Array<string>}
3635
3761
  */
3636
3762
  getAudioLanguages() {}
3637
3763
  /**
3638
3764
  * Return a list of text languages available. If the player has not loaded
3639
3765
  * any content, this will return an empty list.
3640
- * @return {!Array.<string>}
3766
+ * @return {!Array<string>}
3641
3767
  */
3642
3768
  getTextLanguages() {}
3643
3769
  /**
@@ -3681,13 +3807,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3681
3807
  isTextTrackVisible() {}
3682
3808
  /**
3683
3809
  * Return a list of chapters tracks.
3684
- * @return {!Array.<shaka.extern.Track>}
3810
+ * @return {!Array<shaka.extern.Track>}
3685
3811
  */
3686
3812
  getChaptersTracks() {}
3687
3813
  /**
3688
3814
  * This returns the list of chapters.
3689
3815
  * @param {string} language
3690
- * @return {!Array.<shaka.extern.Chapter>}
3816
+ * @return {!Array<shaka.extern.Chapter>}
3691
3817
  */
3692
3818
  getChapters(language) {}
3693
3819
  /**
@@ -3738,7 +3864,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3738
3864
  * @param {string=} codec
3739
3865
  * @param {string=} label
3740
3866
  * @param {boolean=} forced
3741
- * @return {!Promise.<shaka.extern.Track>}
3867
+ * @return {!Promise<shaka.extern.Track>}
3742
3868
  */
3743
3869
  addTextTrackAsync(uri, language, kind, mimeType, codec, label, forced) {}
3744
3870
  /**
@@ -3749,7 +3875,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3749
3875
  * application.
3750
3876
  * @param {string} uri
3751
3877
  * @param {string=} mimeType
3752
- * @return {!Promise.<shaka.extern.Track>}
3878
+ * @return {!Promise<shaka.extern.Track>}
3753
3879
  */
3754
3880
  addThumbnailsTrack(uri, mimeType) {}
3755
3881
  /**
@@ -3759,7 +3885,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3759
3885
  * @param {string} uri
3760
3886
  * @param {string} language
3761
3887
  * @param {string=} mimeType
3762
- * @return {!Promise.<shaka.extern.Track>}
3888
+ * @return {!Promise<shaka.extern.Track>}
3763
3889
  */
3764
3890
  addChaptersTrack(uri, language, mimeType) {}
3765
3891
  /**
@@ -4181,15 +4307,156 @@ shaka.ads.Utils.AD_CONTENT_ATTACH_REQUESTED;
4181
4307
  shaka.ads.InterstitialAd = class {
4182
4308
  /**
4183
4309
  * @param {HTMLMediaElement} video
4184
- * @param {boolean} isSkippable
4185
- * @param {?number} skipOffset
4186
- * @param {?number} skipFor
4310
+ * @param {shaka.extern.AdInterstitial} interstitial
4187
4311
  * @param {function()} onSkip
4188
4312
  * @param {number} sequenceLength
4189
4313
  * @param {number} adPosition
4190
4314
  * @param {boolean} isUsingAnotherMediaElement
4191
4315
  */
4192
- constructor(video, isSkippable, skipOffset, skipFor, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4316
+ constructor(video, interstitial, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4317
+ /**
4318
+ * @override
4319
+ */
4320
+ needsSkipUI() {}
4321
+ /**
4322
+ * @override
4323
+ */
4324
+ isClientRendering() {}
4325
+ /**
4326
+ * @override
4327
+ */
4328
+ isUsingAnotherMediaElement() {}
4329
+ /**
4330
+ * @override
4331
+ */
4332
+ getDuration() {}
4333
+ /**
4334
+ * @override
4335
+ */
4336
+ getMinSuggestedDuration() {}
4337
+ /**
4338
+ * @override
4339
+ */
4340
+ getRemainingTime() {}
4341
+ /**
4342
+ * @override
4343
+ */
4344
+ isPaused() {}
4345
+ /**
4346
+ * @override
4347
+ */
4348
+ isSkippable() {}
4349
+ /**
4350
+ * @override
4351
+ */
4352
+ getTimeUntilSkippable() {}
4353
+ /**
4354
+ * @override
4355
+ */
4356
+ canSkipNow() {}
4357
+ /**
4358
+ * @override
4359
+ */
4360
+ skip() {}
4361
+ /**
4362
+ * @override
4363
+ */
4364
+ pause() {}
4365
+ /**
4366
+ * @override
4367
+ */
4368
+ play() {}
4369
+ /**
4370
+ * @override
4371
+ */
4372
+ getVolume() {}
4373
+ /**
4374
+ * @override
4375
+ */
4376
+ setVolume(volume) {}
4377
+ /**
4378
+ * @override
4379
+ */
4380
+ isMuted() {}
4381
+ /**
4382
+ * @override
4383
+ */
4384
+ isLinear() {}
4385
+ /**
4386
+ * @override
4387
+ */
4388
+ resize(width, height) {}
4389
+ /**
4390
+ * @override
4391
+ */
4392
+ setMuted(muted) {}
4393
+ /**
4394
+ * @override
4395
+ */
4396
+ getSequenceLength() {}
4397
+ /**
4398
+ * @override
4399
+ */
4400
+ getPositionInSequence() {}
4401
+ /**
4402
+ * @override
4403
+ */
4404
+ getTitle() {}
4405
+ /**
4406
+ * @override
4407
+ */
4408
+ getDescription() {}
4409
+ /**
4410
+ * @override
4411
+ */
4412
+ getVastMediaBitrate() {}
4413
+ /**
4414
+ * @override
4415
+ */
4416
+ getVastMediaHeight() {}
4417
+ /**
4418
+ * @override
4419
+ */
4420
+ getVastMediaWidth() {}
4421
+ /**
4422
+ * @override
4423
+ */
4424
+ getAdId() {}
4425
+ /**
4426
+ * @override
4427
+ */
4428
+ getCreativeAdId() {}
4429
+ /**
4430
+ * @override
4431
+ */
4432
+ getAdvertiserName() {}
4433
+ /**
4434
+ * @override
4435
+ */
4436
+ getMediaUrl() {}
4437
+ /**
4438
+ * @override
4439
+ */
4440
+ getTimeOffset() {}
4441
+ /**
4442
+ * @override
4443
+ */
4444
+ getPodIndex() {}
4445
+ /**
4446
+ * @override
4447
+ */
4448
+ release() {}
4449
+ };
4450
+ /**
4451
+ * @implements {shaka.extern.IAd}
4452
+ */
4453
+ shaka.ads.InterstitialStaticAd = class {
4454
+ /**
4455
+ * @param {shaka.extern.AdInterstitial} interstitial
4456
+ * @param {number} sequenceLength
4457
+ * @param {number} adPosition
4458
+ */
4459
+ constructor(interstitial, sequenceLength, adPosition) {}
4193
4460
  /**
4194
4461
  * @override
4195
4462
  */
@@ -4331,6 +4598,7 @@ shaka.ads.MediaTailorAd = class {
4331
4598
  * @param {mediaTailor.Ad} mediaTailorAd
4332
4599
  * @param {number} adPosition
4333
4600
  * @param {number} totalAds
4601
+ * @param {boolean} isLinear
4334
4602
  * @param {HTMLMediaElement} video
4335
4603
  */
4336
4604
  constructor(mediaTailorAd, adPosition, totalAds, isLinear, video) {}
@@ -4638,8 +4906,8 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4638
4906
  */
4639
4907
  release() {}
4640
4908
  /**
4641
- * @override
4642
- */
4909
+ * @override
4910
+ */
4643
4911
  onAssetUnload() {}
4644
4912
  /**
4645
4913
  * @override
@@ -4657,7 +4925,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4657
4925
  * @param {string} url
4658
4926
  * @param {Object} adsParams
4659
4927
  * @param {string=} backupUrl
4660
- * @return {!Promise.<string>}
4928
+ * @return {!Promise<string>}
4661
4929
  * @override
4662
4930
  */
4663
4931
  requestMediaTailorStream(url, adsParams, backupUrl) {}
@@ -4673,7 +4941,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4673
4941
  /**
4674
4942
  * @param {!google.ima.dai.api.StreamRequest} imaRequest
4675
4943
  * @param {string=} backupUrl
4676
- * @return {!Promise.<string>}
4944
+ * @return {!Promise<string>}
4677
4945
  * @override
4678
4946
  */
4679
4947
  requestServerSideStream(imaRequest, backupUrl) {}
@@ -4682,12 +4950,12 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4682
4950
  */
4683
4951
  replaceServerSideAdTagParameters(adTagParameters) {}
4684
4952
  /**
4685
- * @return {!Array.<!shaka.extern.AdCuePoint>}
4953
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4686
4954
  * @override
4687
4955
  */
4688
4956
  getServerSideCuePoints() {}
4689
4957
  /**
4690
- * @return {!Array.<!shaka.extern.AdCuePoint>}
4958
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4691
4959
  * @override
4692
4960
  */
4693
4961
  getCuePoints() {}
@@ -4728,6 +4996,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4728
4996
  * @override
4729
4997
  */
4730
4998
  addAdUrlInterstitial(url) {}
4999
+ /**
5000
+ * @override
5001
+ */
5002
+ getInterstitialPlayer() {}
4731
5003
  };
4732
5004
  /**
4733
5005
  * The event name for when a sequence of ads has been loaded.
@@ -5154,15 +5426,15 @@ shaka.util.PeriodCombiner = class {
5154
5426
  /** */
5155
5427
  constructor() {}
5156
5428
  /**
5157
- * @return {!Array.<shaka.extern.Variant>}
5429
+ * @return {!Array<shaka.extern.Variant>}
5158
5430
  */
5159
5431
  getVariants() {}
5160
5432
  /**
5161
- * @return {!Array.<shaka.extern.Stream>}
5162
- */
5433
+ * @return {!Array<shaka.extern.Stream>}
5434
+ */
5163
5435
  getTextStreams() {}
5164
5436
  /**
5165
- * @return {!Array.<shaka.extern.Stream>}
5437
+ * @return {!Array<shaka.extern.Stream>}
5166
5438
  */
5167
5439
  getImageStreams() {}
5168
5440
  /**
@@ -5172,7 +5444,7 @@ shaka.util.PeriodCombiner = class {
5172
5444
  */
5173
5445
  deleteStream(stream, periodId) {}
5174
5446
  /**
5175
- * @param {!Array.<shaka.extern.Period>} periods
5447
+ * @param {!Array<shaka.extern.Period>} periods
5176
5448
  * @param {boolean} isDynamic
5177
5449
  * @param {boolean=} isPatchUpdate
5178
5450
  * @return {!Promise}
@@ -5185,7 +5457,7 @@ shaka.util.PeriodCombiner = class {
5185
5457
  setAllowMultiTypeVariants(allowed) {}
5186
5458
  /**
5187
5459
  * @param {boolean} useOnce if true, stream will be used only once in period
5188
- * flattening algoritnm.
5460
+ * flattening algorithm.
5189
5461
  */
5190
5462
  setUseStreamOnce(useOnce) {}
5191
5463
  };
@@ -5519,9 +5791,9 @@ shaka.offline.Storage = class {
5519
5791
  * refer to {@link https://bit.ly/StructClone}
5520
5792
  * @param {?string=} mimeType
5521
5793
  * The mime type for the content |manifestUri| points to.
5522
- * @param {?Array.<string>=} externalThumbnails
5794
+ * @param {?Array<string>=} externalThumbnails
5523
5795
  * The external thumbnails to store along the main content.
5524
- * @param {?Array.<shaka.extern.ExtraText>=} externalText
5796
+ * @param {?Array<shaka.extern.ExtraText>=} externalText
5525
5797
  * The external text to store along the main content.
5526
5798
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.StoredContent>}
5527
5799
  * An AbortableOperation that resolves with a structure representing what
@@ -5542,12 +5814,12 @@ shaka.offline.Storage = class {
5542
5814
  /**
5543
5815
  * Removes any EME sessions that were not successfully removed before. This
5544
5816
  * returns whether all the sessions were successfully removed.
5545
- * @return {!Promise.<boolean>}
5817
+ * @return {!Promise<boolean>}
5546
5818
  */
5547
5819
  removeEmeSessions() {}
5548
5820
  /**
5549
5821
  * Lists all the stored content available.
5550
- * @return {!Promise.<!Array.<shaka.extern.StoredContent>>} A Promise to an
5822
+ * @return {!Promise<!Array<shaka.extern.StoredContent>>} A Promise to an
5551
5823
  * array of structures representing all stored content. The "offlineUri"
5552
5824
  * member of the structure is the URI that should be given to Player.load()
5553
5825
  * to play this piece of content offline. The "appMetadata" member is the
@@ -5691,18 +5963,6 @@ shaka.polyfill.PatchedMediaKeysCert = class {
5691
5963
  */
5692
5964
  static install() {}
5693
5965
  };
5694
- /**
5695
- * @summary A polyfill to stub out
5696
- * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
5697
- * EME.
5698
- * All methods will fail.
5699
- */
5700
- shaka.polyfill.PatchedMediaKeysNop = class {
5701
- /**
5702
- * Installs the polyfill if needed.
5703
- */
5704
- static install() {}
5705
- };
5706
5966
  /**
5707
5967
  * @summary A polyfill to implement
5708
5968
  * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of