shaka-player 4.12.9 → 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 (259) 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 +36 -36
  9. package/dist/shaka-player.compiled.d.ts +131 -36
  10. package/dist/shaka-player.compiled.debug.d.ts +131 -36
  11. package/dist/shaka-player.compiled.debug.externs.js +355 -107
  12. package/dist/shaka-player.compiled.debug.js +799 -742
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +355 -107
  15. package/dist/shaka-player.compiled.js +1456 -1423
  16. package/dist/shaka-player.compiled.map +4 -4
  17. package/dist/shaka-player.ui.d.ts +165 -38
  18. package/dist/shaka-player.ui.debug.d.ts +165 -38
  19. package/dist/shaka-player.ui.debug.externs.js +394 -113
  20. package/dist/shaka-player.ui.debug.js +808 -738
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +394 -113
  23. package/dist/shaka-player.ui.js +1671 -1632
  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 +137 -108
  56. package/externs/shaka/text.js +3 -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 +34 -24
  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 +98 -108
  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 +14 -14
  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/manifest_filterer.js +8 -8
  102. package/lib/media/manifest_parser.js +2 -2
  103. package/lib/media/media_source_capabilities.js +20 -1
  104. package/lib/media/media_source_engine.js +71 -26
  105. package/lib/media/mp4_segment_index_parser.js +5 -5
  106. package/lib/media/playhead.js +2 -8
  107. package/lib/media/playhead_observer.js +1 -1
  108. package/lib/media/preference_based_criteria.js +333 -0
  109. package/lib/media/preload_manager.js +53 -37
  110. package/lib/media/presentation_timeline.js +2 -2
  111. package/lib/media/quality_observer.js +35 -35
  112. package/lib/media/region_observer.js +2 -2
  113. package/lib/media/region_timeline.js +3 -3
  114. package/lib/media/segment_index.js +14 -14
  115. package/lib/media/segment_prefetch.js +17 -13
  116. package/lib/media/segment_reference.js +7 -7
  117. package/lib/media/segment_utils.js +9 -9
  118. package/lib/media/streaming_engine.js +77 -38
  119. package/lib/media/time_ranges_utils.js +1 -1
  120. package/lib/media/video_wrapper.js +1 -1
  121. package/lib/media/webm_segment_index_parser.js +4 -4
  122. package/lib/mss/content_protection.js +17 -222
  123. package/lib/mss/mss_parser.js +23 -24
  124. package/lib/net/data_uri_plugin.js +1 -0
  125. package/lib/net/http_fetch_plugin.js +8 -7
  126. package/lib/net/http_plugin_utils.js +5 -2
  127. package/lib/net/http_xhr_plugin.js +4 -3
  128. package/lib/net/networking_engine.js +72 -17
  129. package/lib/net/networking_utils.js +5 -2
  130. package/lib/offline/download_info.js +5 -1
  131. package/lib/offline/download_manager.js +15 -4
  132. package/lib/offline/download_progress_estimator.js +1 -1
  133. package/lib/offline/indexeddb/base_storage_cell.js +9 -9
  134. package/lib/offline/indexeddb/db_connection.js +1 -1
  135. package/lib/offline/indexeddb/db_operation.js +2 -2
  136. package/lib/offline/indexeddb/eme_session_storage_cell.js +1 -1
  137. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  138. package/lib/offline/indexeddb/v1_storage_cell.js +3 -3
  139. package/lib/offline/indexeddb/v2_storage_cell.js +2 -2
  140. package/lib/offline/manifest_converter.js +11 -12
  141. package/lib/offline/offline_scheme.js +8 -4
  142. package/lib/offline/session_deleter.js +11 -11
  143. package/lib/offline/storage.js +137 -88
  144. package/lib/offline/storage_muxer.js +8 -8
  145. package/lib/offline/stored_content_utils.js +3 -3
  146. package/lib/offline/stream_bandwidth_estimator.js +1 -1
  147. package/lib/player.js +270 -207
  148. package/lib/polyfill/all.js +1 -1
  149. package/lib/polyfill/media_capabilities.js +5 -5
  150. package/lib/polyfill/patchedmediakeys_apple.js +6 -6
  151. package/lib/polyfill/patchedmediakeys_webkit.js +8 -8
  152. package/lib/polyfill/video_play_promise.js +0 -1
  153. package/lib/text/cue.js +3 -2
  154. package/lib/text/lrc_text_parser.js +1 -1
  155. package/lib/text/mp4_ttml_parser.js +1 -1
  156. package/lib/text/mp4_vtt_parser.js +3 -3
  157. package/lib/text/sbv_text_parser.js +1 -1
  158. package/lib/text/ssa_text_parser.js +3 -1
  159. package/lib/text/stub_text_displayer.js +5 -5
  160. package/lib/text/text_engine.js +5 -4
  161. package/lib/text/text_utils.js +4 -4
  162. package/lib/text/ttml_text_parser.js +21 -20
  163. package/lib/text/ui_text_displayer.js +13 -13
  164. package/lib/text/vtt_text_parser.js +10 -10
  165. package/lib/text/web_vtt_generator.js +2 -2
  166. package/lib/transmuxer/aac_transmuxer.js +2 -2
  167. package/lib/transmuxer/ac3_transmuxer.js +2 -2
  168. package/lib/transmuxer/adts.js +2 -0
  169. package/lib/transmuxer/ec3.js +3 -3
  170. package/lib/transmuxer/ec3_transmuxer.js +2 -2
  171. package/lib/transmuxer/h264.js +5 -5
  172. package/lib/transmuxer/h265.js +3 -3
  173. package/lib/transmuxer/mp3_transmuxer.js +2 -2
  174. package/lib/transmuxer/mpeg_audio.js +6 -6
  175. package/lib/transmuxer/mss_transmuxer.js +2 -0
  176. package/lib/transmuxer/transmuxer_engine.js +1 -1
  177. package/lib/transmuxer/ts_transmuxer.js +10 -10
  178. package/lib/util/abortable_operation.js +10 -10
  179. package/lib/util/array_utils.js +6 -6
  180. package/lib/util/cmcd_manager.js +149 -18
  181. package/lib/util/cmsd_manager.js +11 -11
  182. package/lib/util/config_utils.js +3 -3
  183. package/lib/util/content_steering_manager.js +17 -17
  184. package/lib/util/data_view_reader.js +3 -3
  185. package/lib/util/ebml_parser.js +1 -1
  186. package/lib/util/error.js +11 -6
  187. package/lib/util/event_manager.js +1 -1
  188. package/lib/util/exp_golomb.js +1 -1
  189. package/lib/util/fairplay_utils.js +6 -1
  190. package/lib/util/fake_event.js +3 -2
  191. package/lib/util/fake_event_target.js +1 -1
  192. package/lib/util/functional.js +8 -8
  193. package/lib/util/id3_utils.js +1 -1
  194. package/lib/util/iterables.js +6 -6
  195. package/lib/util/language_utils.js +17 -17
  196. package/lib/util/manifest_parser_utils.js +13 -13
  197. package/lib/util/map_utils.js +6 -6
  198. package/lib/util/media_ready_state_utils.js +1 -1
  199. package/lib/util/mime_utils.js +15 -4
  200. package/lib/util/mp4_box_parsers.js +5 -5
  201. package/lib/util/mp4_generator.js +31 -30
  202. package/lib/util/mp4_parser.js +2 -2
  203. package/lib/util/multi_map.js +5 -5
  204. package/lib/util/mutex.js +1 -1
  205. package/lib/util/networking.js +1 -1
  206. package/lib/util/object_utils.js +5 -1
  207. package/lib/util/operation_manager.js +1 -1
  208. package/lib/util/periods.js +24 -24
  209. package/lib/util/platform.js +8 -4
  210. package/lib/util/player_configuration.js +50 -17
  211. package/lib/util/pssh.js +34 -6
  212. package/lib/util/public_promise.js +2 -2
  213. package/lib/util/state_history.js +2 -2
  214. package/lib/util/stream_utils.js +138 -120
  215. package/lib/util/string_utils.js +4 -3
  216. package/lib/util/switch_history.js +2 -2
  217. package/lib/util/tXml.js +22 -17
  218. package/lib/util/text_parser.js +2 -2
  219. package/lib/util/timer.js +1 -1
  220. package/lib/util/ts_parser.js +22 -22
  221. package/lib/util/xml_utils.js +1 -0
  222. package/package.json +7 -4
  223. package/project-words.txt +485 -0
  224. package/shaka-player.uncompiled.js +1 -1
  225. package/third_party/closure-uri/uri.js +2 -2
  226. package/third_party/closure-uri/utils.js +2 -2
  227. package/third_party/language-mapping-list/language-mapping-list.js +1 -1
  228. package/ui/ad_statistics_button.js +9 -5
  229. package/ui/airplay_button.js +1 -0
  230. package/ui/audio_language_selection.js +2 -1
  231. package/ui/context_menu.js +2 -2
  232. package/ui/controls.js +7 -7
  233. package/ui/externs/ui.js +29 -21
  234. package/ui/externs/watermark.js +64 -0
  235. package/ui/fast_forward_button.js +1 -1
  236. package/ui/gl_matrix/matrix_4x4.js +11 -5
  237. package/ui/hidden_fast_forward_button.js +1 -1
  238. package/ui/hidden_seek_button.js +1 -1
  239. package/ui/language_utils.js +27 -26
  240. package/ui/less/buttons.less +2 -2
  241. package/ui/localization.js +21 -21
  242. package/ui/loop_button.js +2 -2
  243. package/ui/overflow_menu.js +2 -2
  244. package/ui/playback_rate_selection.js +1 -1
  245. package/ui/presentation_time.js +4 -1
  246. package/ui/range_element.js +2 -2
  247. package/ui/resolution_selection.js +42 -6
  248. package/ui/rewind_button.js +1 -1
  249. package/ui/seek_bar.js +5 -5
  250. package/ui/statistics_button.js +8 -4
  251. package/ui/text_selection.js +3 -2
  252. package/ui/ui.js +32 -2
  253. package/ui/vr_manager.js +3 -3
  254. package/ui/vr_utils.js +14 -14
  255. package/ui/vr_webgl.js +5 -5
  256. package/ui/watermark.js +313 -0
  257. package/.eslintignore +0 -4
  258. package/.eslintrc.js +0 -310
  259. 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.
@@ -3073,9 +3175,9 @@ shaka.text.SimpleTextDisplayer = class {
3073
3175
  enableTextDisplayer() {}
3074
3176
  };
3075
3177
  /**
3076
- * A stub text displayer plugin that does nothing
3077
- * @implements {shaka.extern.TextDisplayer}
3078
- */
3178
+ * A stub text displayer plugin that does nothing
3179
+ * @implements {shaka.extern.TextDisplayer}
3180
+ */
3079
3181
  shaka.text.StubTextDisplayer = class {
3080
3182
  /**
3081
3183
  * @override
@@ -3244,7 +3346,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3244
3346
  static registerSupportPlugin(name, callback) {}
3245
3347
  /**
3246
3348
  * Set a factory to create an ad manager during player construction time.
3247
- * This method needs to be called bafore instantiating the Player class.
3349
+ * This method needs to be called before instantiating the Player class.
3248
3350
  * @param {!shaka.extern.IAdManager.Factory} factory
3249
3351
  */
3250
3352
  static setAdManagerFactory(factory) {}
@@ -3263,7 +3365,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3263
3365
  * NOTE: This may show a request to the user for permission.
3264
3366
  * @see https://bit.ly/2ywccmH
3265
3367
  * @param {boolean=} promptsOkay
3266
- * @return {!Promise.<shaka.extern.SupportType>}
3368
+ * @return {!Promise<shaka.extern.SupportType>}
3267
3369
  */
3268
3370
  static probeSupport(promptsOkay) {}
3269
3371
  /**
@@ -3323,7 +3425,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3323
3425
  * When in src= mode, this unloads but does not make a PreloadManager.
3324
3426
  * @param {boolean=} initializeMediaSource
3325
3427
  * @param {boolean=} keepAdManager
3326
- * @return {!Promise.<?shaka.media.PreloadManager>}
3428
+ * @return {!Promise<?shaka.media.PreloadManager>}
3327
3429
  */
3328
3430
  unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3329
3431
  /**
@@ -3335,7 +3437,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3335
3437
  * attached to something else.
3336
3438
  * @param {boolean=} keepAdManager
3337
3439
  * @param {boolean=} saveLivePosition
3338
- * @return {!Promise.<?shaka.media.PreloadManager>}
3440
+ * @return {!Promise<?shaka.media.PreloadManager>}
3339
3441
  */
3340
3442
  detachAndSavePreload(keepAdManager, saveLivePosition) {}
3341
3443
  /**
@@ -3357,7 +3459,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3357
3459
  * <code>undefined</code>, playback will start at the default start time (0
3358
3460
  * for VOD and liveEdge for LIVE).
3359
3461
  * @param {?string=} mimeType
3360
- * @return {!Promise.<?shaka.media.PreloadManager>}
3462
+ * @return {!Promise<?shaka.media.PreloadManager>}
3361
3463
  */
3362
3464
  preload(assetUri, startTime, mimeType) {}
3363
3465
  /**
@@ -3391,6 +3493,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3391
3493
  * there were invalid entries.
3392
3494
  */
3393
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) {}
3394
3503
  /**
3395
3504
  * Return a copy of the current configuration. Modifications of the returned
3396
3505
  * value will not affect the Player's active configuration. You must call
@@ -3398,6 +3507,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3398
3507
  * @return {shaka.extern.PlayerConfiguration}
3399
3508
  */
3400
3509
  getConfiguration() {}
3510
+ /**
3511
+ * Return a copy of the current configuration for low latency.
3512
+ * @return {!Object}
3513
+ */
3514
+ getConfigurationForLowLatency() {}
3401
3515
  /**
3402
3516
  * Return a copy of the current non default configuration. Modifications of
3403
3517
  * the returned value will not affect the Player's active configuration.
@@ -3511,7 +3625,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3511
3625
  getExpiration() {}
3512
3626
  /**
3513
3627
  * Returns the active sessions metadata
3514
- * @return {!Array.<shaka.extern.DrmSessionMetadata>}
3628
+ * @return {!Array<shaka.extern.DrmSessionMetadata>}
3515
3629
  */
3516
3630
  getActiveSessionsMetadata() {}
3517
3631
  /**
@@ -3562,27 +3676,27 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3562
3676
  * Return a list of variant tracks that can be switched to.
3563
3677
  * <p>
3564
3678
  * If the player has not loaded content, this will return an empty list.
3565
- * @return {!Array.<shaka.extern.Track>}
3679
+ * @return {!Array<shaka.extern.Track>}
3566
3680
  */
3567
3681
  getVariantTracks() {}
3568
3682
  /**
3569
3683
  * Return a list of text tracks that can be switched to.
3570
3684
  * <p>
3571
3685
  * If the player has not loaded content, this will return an empty list.
3572
- * @return {!Array.<shaka.extern.Track>}
3686
+ * @return {!Array<shaka.extern.Track>}
3573
3687
  */
3574
3688
  getTextTracks() {}
3575
3689
  /**
3576
3690
  * Return a list of image tracks that can be switched to.
3577
3691
  * If the player has not loaded content, this will return an empty list.
3578
- * @return {!Array.<shaka.extern.Track>}
3692
+ * @return {!Array<shaka.extern.Track>}
3579
3693
  */
3580
3694
  getImageTracks() {}
3581
3695
  /**
3582
3696
  * Returns Thumbnail objects for each thumbnail for a given image track ID.
3583
3697
  * If the player has not loaded content, this will return a null.
3584
3698
  * @param {number} trackId
3585
- * @return {!Promise.<?Array<!shaka.extern.Thumbnail>>}
3699
+ * @return {!Promise<?Array<!shaka.extern.Thumbnail>>}
3586
3700
  */
3587
3701
  getAllThumbnails(trackId) {}
3588
3702
  /**
@@ -3590,7 +3704,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3590
3704
  * If the player has not loaded content, this will return a null.
3591
3705
  * @param {number} trackId
3592
3706
  * @param {number} time
3593
- * @return {!Promise.<?shaka.extern.Thumbnail>}
3707
+ * @return {!Promise<?shaka.extern.Thumbnail>}
3594
3708
  */
3595
3709
  getThumbnails(trackId, time) {}
3596
3710
  /**
@@ -3631,25 +3745,25 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3631
3745
  /**
3632
3746
  * Return a list of audio language-role combinations available. If the
3633
3747
  * player has not loaded any content, this will return an empty list.
3634
- * @return {!Array.<shaka.extern.LanguageRole>}
3748
+ * @return {!Array<shaka.extern.LanguageRole>}
3635
3749
  */
3636
3750
  getAudioLanguagesAndRoles() {}
3637
3751
  /**
3638
3752
  * Return a list of text language-role combinations available. If the player
3639
3753
  * has not loaded any content, this will be return an empty list.
3640
- * @return {!Array.<shaka.extern.LanguageRole>}
3754
+ * @return {!Array<shaka.extern.LanguageRole>}
3641
3755
  */
3642
3756
  getTextLanguagesAndRoles() {}
3643
3757
  /**
3644
3758
  * Return a list of audio languages available. If the player has not loaded
3645
3759
  * any content, this will return an empty list.
3646
- * @return {!Array.<string>}
3760
+ * @return {!Array<string>}
3647
3761
  */
3648
3762
  getAudioLanguages() {}
3649
3763
  /**
3650
3764
  * Return a list of text languages available. If the player has not loaded
3651
3765
  * any content, this will return an empty list.
3652
- * @return {!Array.<string>}
3766
+ * @return {!Array<string>}
3653
3767
  */
3654
3768
  getTextLanguages() {}
3655
3769
  /**
@@ -3693,13 +3807,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3693
3807
  isTextTrackVisible() {}
3694
3808
  /**
3695
3809
  * Return a list of chapters tracks.
3696
- * @return {!Array.<shaka.extern.Track>}
3810
+ * @return {!Array<shaka.extern.Track>}
3697
3811
  */
3698
3812
  getChaptersTracks() {}
3699
3813
  /**
3700
3814
  * This returns the list of chapters.
3701
3815
  * @param {string} language
3702
- * @return {!Array.<shaka.extern.Chapter>}
3816
+ * @return {!Array<shaka.extern.Chapter>}
3703
3817
  */
3704
3818
  getChapters(language) {}
3705
3819
  /**
@@ -3750,7 +3864,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3750
3864
  * @param {string=} codec
3751
3865
  * @param {string=} label
3752
3866
  * @param {boolean=} forced
3753
- * @return {!Promise.<shaka.extern.Track>}
3867
+ * @return {!Promise<shaka.extern.Track>}
3754
3868
  */
3755
3869
  addTextTrackAsync(uri, language, kind, mimeType, codec, label, forced) {}
3756
3870
  /**
@@ -3761,7 +3875,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3761
3875
  * application.
3762
3876
  * @param {string} uri
3763
3877
  * @param {string=} mimeType
3764
- * @return {!Promise.<shaka.extern.Track>}
3878
+ * @return {!Promise<shaka.extern.Track>}
3765
3879
  */
3766
3880
  addThumbnailsTrack(uri, mimeType) {}
3767
3881
  /**
@@ -3771,7 +3885,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3771
3885
  * @param {string} uri
3772
3886
  * @param {string} language
3773
3887
  * @param {string=} mimeType
3774
- * @return {!Promise.<shaka.extern.Track>}
3888
+ * @return {!Promise<shaka.extern.Track>}
3775
3889
  */
3776
3890
  addChaptersTrack(uri, language, mimeType) {}
3777
3891
  /**
@@ -4193,15 +4307,156 @@ shaka.ads.Utils.AD_CONTENT_ATTACH_REQUESTED;
4193
4307
  shaka.ads.InterstitialAd = class {
4194
4308
  /**
4195
4309
  * @param {HTMLMediaElement} video
4196
- * @param {boolean} isSkippable
4197
- * @param {?number} skipOffset
4198
- * @param {?number} skipFor
4310
+ * @param {shaka.extern.AdInterstitial} interstitial
4199
4311
  * @param {function()} onSkip
4200
4312
  * @param {number} sequenceLength
4201
4313
  * @param {number} adPosition
4202
4314
  * @param {boolean} isUsingAnotherMediaElement
4203
4315
  */
4204
- 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) {}
4205
4460
  /**
4206
4461
  * @override
4207
4462
  */
@@ -4343,6 +4598,7 @@ shaka.ads.MediaTailorAd = class {
4343
4598
  * @param {mediaTailor.Ad} mediaTailorAd
4344
4599
  * @param {number} adPosition
4345
4600
  * @param {number} totalAds
4601
+ * @param {boolean} isLinear
4346
4602
  * @param {HTMLMediaElement} video
4347
4603
  */
4348
4604
  constructor(mediaTailorAd, adPosition, totalAds, isLinear, video) {}
@@ -4650,8 +4906,8 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4650
4906
  */
4651
4907
  release() {}
4652
4908
  /**
4653
- * @override
4654
- */
4909
+ * @override
4910
+ */
4655
4911
  onAssetUnload() {}
4656
4912
  /**
4657
4913
  * @override
@@ -4669,7 +4925,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4669
4925
  * @param {string} url
4670
4926
  * @param {Object} adsParams
4671
4927
  * @param {string=} backupUrl
4672
- * @return {!Promise.<string>}
4928
+ * @return {!Promise<string>}
4673
4929
  * @override
4674
4930
  */
4675
4931
  requestMediaTailorStream(url, adsParams, backupUrl) {}
@@ -4685,7 +4941,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4685
4941
  /**
4686
4942
  * @param {!google.ima.dai.api.StreamRequest} imaRequest
4687
4943
  * @param {string=} backupUrl
4688
- * @return {!Promise.<string>}
4944
+ * @return {!Promise<string>}
4689
4945
  * @override
4690
4946
  */
4691
4947
  requestServerSideStream(imaRequest, backupUrl) {}
@@ -4694,12 +4950,12 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4694
4950
  */
4695
4951
  replaceServerSideAdTagParameters(adTagParameters) {}
4696
4952
  /**
4697
- * @return {!Array.<!shaka.extern.AdCuePoint>}
4953
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4698
4954
  * @override
4699
4955
  */
4700
4956
  getServerSideCuePoints() {}
4701
4957
  /**
4702
- * @return {!Array.<!shaka.extern.AdCuePoint>}
4958
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4703
4959
  * @override
4704
4960
  */
4705
4961
  getCuePoints() {}
@@ -4740,6 +4996,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4740
4996
  * @override
4741
4997
  */
4742
4998
  addAdUrlInterstitial(url) {}
4999
+ /**
5000
+ * @override
5001
+ */
5002
+ getInterstitialPlayer() {}
4743
5003
  };
4744
5004
  /**
4745
5005
  * The event name for when a sequence of ads has been loaded.
@@ -5166,15 +5426,15 @@ shaka.util.PeriodCombiner = class {
5166
5426
  /** */
5167
5427
  constructor() {}
5168
5428
  /**
5169
- * @return {!Array.<shaka.extern.Variant>}
5429
+ * @return {!Array<shaka.extern.Variant>}
5170
5430
  */
5171
5431
  getVariants() {}
5172
5432
  /**
5173
- * @return {!Array.<shaka.extern.Stream>}
5174
- */
5433
+ * @return {!Array<shaka.extern.Stream>}
5434
+ */
5175
5435
  getTextStreams() {}
5176
5436
  /**
5177
- * @return {!Array.<shaka.extern.Stream>}
5437
+ * @return {!Array<shaka.extern.Stream>}
5178
5438
  */
5179
5439
  getImageStreams() {}
5180
5440
  /**
@@ -5184,7 +5444,7 @@ shaka.util.PeriodCombiner = class {
5184
5444
  */
5185
5445
  deleteStream(stream, periodId) {}
5186
5446
  /**
5187
- * @param {!Array.<shaka.extern.Period>} periods
5447
+ * @param {!Array<shaka.extern.Period>} periods
5188
5448
  * @param {boolean} isDynamic
5189
5449
  * @param {boolean=} isPatchUpdate
5190
5450
  * @return {!Promise}
@@ -5197,7 +5457,7 @@ shaka.util.PeriodCombiner = class {
5197
5457
  setAllowMultiTypeVariants(allowed) {}
5198
5458
  /**
5199
5459
  * @param {boolean} useOnce if true, stream will be used only once in period
5200
- * flattening algoritnm.
5460
+ * flattening algorithm.
5201
5461
  */
5202
5462
  setUseStreamOnce(useOnce) {}
5203
5463
  };
@@ -5531,9 +5791,9 @@ shaka.offline.Storage = class {
5531
5791
  * refer to {@link https://bit.ly/StructClone}
5532
5792
  * @param {?string=} mimeType
5533
5793
  * The mime type for the content |manifestUri| points to.
5534
- * @param {?Array.<string>=} externalThumbnails
5794
+ * @param {?Array<string>=} externalThumbnails
5535
5795
  * The external thumbnails to store along the main content.
5536
- * @param {?Array.<shaka.extern.ExtraText>=} externalText
5796
+ * @param {?Array<shaka.extern.ExtraText>=} externalText
5537
5797
  * The external text to store along the main content.
5538
5798
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.StoredContent>}
5539
5799
  * An AbortableOperation that resolves with a structure representing what
@@ -5554,12 +5814,12 @@ shaka.offline.Storage = class {
5554
5814
  /**
5555
5815
  * Removes any EME sessions that were not successfully removed before. This
5556
5816
  * returns whether all the sessions were successfully removed.
5557
- * @return {!Promise.<boolean>}
5817
+ * @return {!Promise<boolean>}
5558
5818
  */
5559
5819
  removeEmeSessions() {}
5560
5820
  /**
5561
5821
  * Lists all the stored content available.
5562
- * @return {!Promise.<!Array.<shaka.extern.StoredContent>>} A Promise to an
5822
+ * @return {!Promise<!Array<shaka.extern.StoredContent>>} A Promise to an
5563
5823
  * array of structures representing all stored content. The "offlineUri"
5564
5824
  * member of the structure is the URI that should be given to Player.load()
5565
5825
  * to play this piece of content offline. The "appMetadata" member is the
@@ -5703,18 +5963,6 @@ shaka.polyfill.PatchedMediaKeysCert = class {
5703
5963
  */
5704
5964
  static install() {}
5705
5965
  };
5706
- /**
5707
- * @summary A polyfill to stub out
5708
- * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
5709
- * EME.
5710
- * All methods will fail.
5711
- */
5712
- shaka.polyfill.PatchedMediaKeysNop = class {
5713
- /**
5714
- * Installs the polyfill if needed.
5715
- */
5716
- static install() {}
5717
- };
5718
5966
  /**
5719
5967
  * @summary A polyfill to implement
5720
5968
  * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of