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
@@ -58,7 +58,7 @@ shaka.util.CmcdManager = {};
58
58
  shaka.util.FakeEvent = class {
59
59
  /**
60
60
  * @param {string} type
61
- * @param {Map.<string, Object>=} dict
61
+ * @param {Map<string, Object>=} dict
62
62
  */
63
63
  constructor(type, dict) {}
64
64
  };
@@ -365,6 +365,7 @@ shaka.util.Error.Code = {
365
365
  'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
366
366
  'MIN_HDCP_VERSION_NOT_MATCH': 6018,
367
367
  'ERROR_CHECKING_HDCP_VERSION': 6019,
368
+ 'MISSING_EME_SUPPORT': 6020,
368
369
  'LOAD_INTERRUPTED': 7000,
369
370
  'OPERATION_ABORTED': 7001,
370
371
  'NO_VIDEO_ELEMENT': 7002,
@@ -671,7 +672,7 @@ shaka.util.LanguageUtils = class {
671
672
  * Find the locale in |searchSpace| that comes closest to |target|. If no
672
673
  * locale is found to be close to |target|, then |null| will be returned.
673
674
  * @param {string} target
674
- * @param {!Iterable.<string>} searchSpace
675
+ * @param {!Iterable<string>} searchSpace
675
676
  * @return {?string}
676
677
  */
677
678
  static findClosestLocale(target, searchSpace) {}
@@ -700,7 +701,7 @@ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
700
701
  * of the preferred locales cannot be found, the localization system will fire
701
702
  * an event identifying which locales it does not know. The localization
702
703
  * system will then continue to operate using the closest matches it has.
703
- * @param {!Iterable.<string>} locales
704
+ * @param {!Iterable<string>} locales
704
705
  * The locale codes for the requested locales in order of preference.
705
706
  */
706
707
  changeLocale(locales) {}
@@ -709,7 +710,7 @@ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
709
710
  * existing localizations for the given locale.
710
711
  * @param {string} locale
711
712
  * The locale that the localizations should be added to.
712
- * @param {!Map.<string, string>} localizations
713
+ * @param {!Map<string, string>} localizations
713
714
  * A mapping of id to localized text that should used to modify the internal
714
715
  * collection of localizations.
715
716
  * @param {shaka.ui.Localization.ConflictResolution=} conflictResolution
@@ -727,7 +728,7 @@ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
727
728
  * for (const key of dictionary.keys()) {
728
729
  * dictionary.set(key, localization.resolve(key));
729
730
  * }
730
- * @param {!Map.<string, string>} dictionary
731
+ * @param {!Map<string, string>} dictionary
731
732
  */
732
733
  resolveDictionary(dictionary) {}
733
734
  /**
@@ -741,7 +742,7 @@ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
741
742
  resolve(id) {}
742
743
  /**
743
744
  * The locales currently used. An empty set means "no preference".
744
- * @return {!Set.<string>}
745
+ * @return {!Set<string>}
745
746
  */
746
747
  getCurrentLocales() {}
747
748
  };
@@ -843,7 +844,7 @@ shaka.util.EventManager.ListenerType;
843
844
  * The IClosedCaptionParser defines the interface to provide all operations for
844
845
  * parsing the closed captions embedded in Dash videos streams.
845
846
  * TODO: Remove this interface and move method definitions
846
- * directly to ClosedCaptonParser.
847
+ * directly to ClosedCaptionParser.
847
848
  * @interface
848
849
  */
849
850
  shaka.media.IClosedCaptionParser = class {
@@ -1156,7 +1157,7 @@ shaka.text.Cue.prototype.textCombineUpright;
1156
1157
  /**
1157
1158
  * Text decoration. A combination of underline, overline
1158
1159
  * and line through. Empty array means no decoration.
1159
- * @type {!Array.<!shaka.text.Cue.textDecoration>}
1160
+ * @type {!Array<!shaka.text.Cue.textDecoration>}
1160
1161
  */
1161
1162
  shaka.text.Cue.prototype.textDecoration;
1162
1163
  /**
@@ -1188,7 +1189,7 @@ shaka.text.Cue.prototype.id;
1188
1189
  * Nested cues, which should be laid out horizontally in one block.
1189
1190
  * Top-level cues are blocks, and nested cues are inline elements.
1190
1191
  * Cues can be nested arbitrarily deeply.
1191
- * @type {!Array.<!shaka.text.Cue>}
1192
+ * @type {!Array<!shaka.text.Cue>}
1192
1193
  */
1193
1194
  shaka.text.Cue.prototype.nestedCues;
1194
1195
  /**
@@ -1543,30 +1544,23 @@ shaka.config.AutoShowText = {
1543
1544
  'IF_PREFERRED_TEXT_LANGUAGE': 2,
1544
1545
  'IF_SUBTITLES_MAY_BE_NEEDED': 3
1545
1546
  };
1546
- /**
1547
- * @enum {string}
1548
- */
1549
- shaka.config.CodecSwitchingStrategy = {
1550
- 'RELOAD': 'reload',
1551
- 'SMOOTH': 'smooth'
1552
- };
1553
1547
  /**
1554
1548
  * A utility to wrap abortable operations. Note that these are not cancelable.
1555
- * Cancelation implies undoing what has been done so far, whereas aborting only
1549
+ * Cancellation implies undoing what has been done so far, whereas aborting only
1556
1550
  * means that further work is stopped.
1557
- * @implements {shaka.extern.IAbortableOperation.<T>}
1551
+ * @implements {shaka.extern.IAbortableOperation<T>}
1558
1552
  * @template T
1559
1553
  */
1560
1554
  shaka.util.AbortableOperation = class {
1561
1555
  /**
1562
- * @param {!Promise.<T>} promise
1556
+ * @param {!Promise<T>} promise
1563
1557
  * A Promise which represents the underlying operation. It is resolved when
1564
1558
  * the operation is complete, and rejected if the operation fails or is
1565
1559
  * aborted. Aborted operations should be rejected with a shaka.util.Error
1566
1560
  * object using the error code OPERATION_ABORTED.
1567
1561
  * @param {function():!Promise} onAbort
1568
1562
  * Will be called by this object to abort the underlying operation.
1569
- * This is not cancelation, and will not necessarily result in any work
1563
+ * This is not cancellation, and will not necessarily result in any work
1570
1564
  * being undone. abort() should return a Promise which is resolved when the
1571
1565
  * underlying operation has been aborted. The returned Promise should never
1572
1566
  * be rejected.
@@ -1595,7 +1589,7 @@ shaka.util.AbortableOperation = class {
1595
1589
  */
1596
1590
  static completed(value) {}
1597
1591
  /**
1598
- * @param {!Promise.<U>} promise
1592
+ * @param {!Promise<U>} promise
1599
1593
  * @return {!shaka.util.AbortableOperation.<U>} An operation which cannot be
1600
1594
  * aborted. It will be completed when the given Promise is resolved, or
1601
1595
  * will be failed when the given Promise is rejected.
@@ -1607,7 +1601,7 @@ shaka.util.AbortableOperation = class {
1607
1601
  */
1608
1602
  abort() {}
1609
1603
  /**
1610
- * @param {!Array.<!shaka.util.AbortableOperation>} operations
1604
+ * @param {!Array<!shaka.util.AbortableOperation>} operations
1611
1605
  * @return {!shaka.util.AbortableOperation} An operation which is resolved
1612
1606
  * when all operations are successful and fails when any operation fails.
1613
1607
  * For this operation, abort() aborts all given operations.
@@ -1620,7 +1614,7 @@ shaka.util.AbortableOperation = class {
1620
1614
  /**
1621
1615
  * @param {(undefined|
1622
1616
  * function(T):U|
1623
- * function(T):!Promise.<U>|
1617
+ * function(T):!Promise<U>|
1624
1618
  * function(T):!shaka.util.AbortableOperation.<U>)} onSuccess
1625
1619
  * A callback to be invoked after this operation is complete, to chain to
1626
1620
  * another operation. The callback can return a plain value, a Promise to
@@ -1637,7 +1631,7 @@ shaka.util.AbortableOperation = class {
1637
1631
  chain(onSuccess, onError) {}
1638
1632
  };
1639
1633
  /**
1640
- * @const {!Promise.<T>}
1634
+ * @const {!Promise<T>}
1641
1635
  */
1642
1636
  shaka.util.AbortableOperation.prototype.promise;
1643
1637
  /**
@@ -1655,6 +1649,8 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1655
1649
  * of whether the switching is allowed.
1656
1650
  * @param {shaka.net.NetworkingEngine.OnHeadersReceived=} onHeadersReceived
1657
1651
  * Called when the headers are received for a download.
1652
+ * @param {shaka.net.NetworkingEngine.OnDownloadCompleted=
1653
+ * } onDownloadCompleted Called when a download completed successfully.
1658
1654
  * @param {shaka.net.NetworkingEngine.OnDownloadFailed=} onDownloadFailed
1659
1655
  * Called when a download fails, for any reason.
1660
1656
  * @param {shaka.net.NetworkingEngine.OnRequest=} onRequest
@@ -1664,7 +1660,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1664
1660
  * @param {shaka.net.NetworkingEngine.OnResponse=} onResponse
1665
1661
  * Called when receive the response
1666
1662
  */
1667
- constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
1663
+ constructor(onProgressUpdated, onHeadersReceived, onDownloadCompleted, onDownloadFailed, onRequest, onRetry, onResponse) {}
1668
1664
  /**
1669
1665
  * @param {boolean} forceHTTP
1670
1666
  */
@@ -1720,6 +1716,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1720
1716
  * Clears all response filters.
1721
1717
  */
1722
1718
  clearAllResponseFilters() {}
1719
+ /**
1720
+ * Clears Common Access Token map.
1721
+ */
1722
+ clearCommonAccessTokenMap() {}
1723
1723
  /**
1724
1724
  * Gets a copy of the default retry parameters.
1725
1725
  * @return {shaka.extern.RetryParameters}
@@ -1729,7 +1729,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1729
1729
  static defaultRetryParameters() {}
1730
1730
  /**
1731
1731
  * Makes a simple network request for the given URIs.
1732
- * @param {!Array.<string>} uris
1732
+ * @param {!Array<string>} uris
1733
1733
  * @param {shaka.extern.RetryParameters} retryParams
1734
1734
  * @param {?function(BufferSource):!Promise=} streamDataCallback
1735
1735
  * @return {shaka.extern.Request}
@@ -1776,12 +1776,12 @@ shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOp
1776
1776
  * shaka.util.Error object using the error code OPERATION_ABORTED.
1777
1777
  * @param {function():!Promise} onAbort
1778
1778
  * Will be called by this object to abort the underlying operation. This
1779
- * is not cancelation, and will not necessarily result in any work being
1779
+ * is not cancellation, and will not necessarily result in any work being
1780
1780
  * undone. abort() should return a Promise which is resolved when the
1781
1781
  * underlying operation has been aborted. The returned Promise should
1782
1782
  * never be rejected.
1783
- * @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
1784
- * numBytesRemainingObj
1783
+ * @param {shaka.net.NetworkingEngine.NumBytesRemainingClass
1784
+ * } numBytesRemainingObj
1785
1785
  */
1786
1786
  constructor(promise, onAbort, numBytesRemainingObj) {}
1787
1787
  };
@@ -1836,7 +1836,7 @@ shaka.net.NetworkingEngine.PluginPriority = {
1836
1836
  };
1837
1837
  /**
1838
1838
  * @typedef {function(
1839
- * !Object.<string, string>,
1839
+ * !Object<string, string>,
1840
1840
  * !shaka.extern.Request,
1841
1841
  * !shaka.net.NetworkingEngine.RequestType)}
1842
1842
  * @description
@@ -1857,6 +1857,15 @@ shaka.net.NetworkingEngine.OnHeadersReceived;
1857
1857
  * original request.
1858
1858
  */
1859
1859
  shaka.net.NetworkingEngine.onProgressUpdated;
1860
+ /**
1861
+ * @typedef {function(
1862
+ * !shaka.extern.Request,
1863
+ * !shaka.extern.Response)}
1864
+ * @description
1865
+ * A callback function that notifies the player when a download completed
1866
+ * successfully.
1867
+ */
1868
+ shaka.net.NetworkingEngine.OnDownloadCompleted;
1860
1869
  /**
1861
1870
  * @typedef {function(
1862
1871
  * !shaka.extern.Request,
@@ -1898,8 +1907,8 @@ shaka.net.NetworkingEngine.OnRetry;
1898
1907
  */
1899
1908
  shaka.net.NetworkingEngine.OnResponse;
1900
1909
  /**
1901
- * @summary DataViewReader abstracts a DataView object.
1902
- */
1910
+ * @summary DataViewReader abstracts a DataView object.
1911
+ */
1903
1912
  shaka.util.DataViewReader = class {
1904
1913
  /**
1905
1914
  * @param {BufferSource} data
@@ -2083,6 +2092,91 @@ shaka.util.Mp4Parser = class {
2083
2092
  * @typedef {function(!shaka.extern.ParsedBox)}
2084
2093
  */
2085
2094
  shaka.util.Mp4Parser.CallbackType;
2095
+ /**
2096
+ * A set of variants that we want to adapt between.
2097
+ * @final
2098
+ */
2099
+ shaka.media.AdaptationSet = class {
2100
+ /**
2101
+ * @param {shaka.extern.Variant} root
2102
+ * The variant that all other variants will be tested against when being
2103
+ * added to the adaptation set. If a variant is not compatible with the
2104
+ * root, it will not be added.
2105
+ * @param {!Iterable<shaka.extern.Variant>=} candidates
2106
+ * Variants that may be compatible with the root and should be added if
2107
+ * compatible. If a candidate is not compatible, it will not end up in the
2108
+ * adaptation set.
2109
+ * @param {boolean=} compareCodecs
2110
+ */
2111
+ constructor(root, candidates, compareCodecs) {}
2112
+ };
2113
+ /**
2114
+ * @enum {string}
2115
+ */
2116
+ shaka.config.CodecSwitchingStrategy = {
2117
+ 'RELOAD': 'reload',
2118
+ 'SMOOTH': 'smooth'
2119
+ };
2120
+ /**
2121
+ * An adaptation set criteria is a unit of logic that can take a set of
2122
+ * variants and return a subset of variants that should (and can) be
2123
+ * adapted between.
2124
+ * @interface
2125
+ */
2126
+ shaka.media.AdaptationSetCriteria = class {
2127
+ /**
2128
+ * Take a set of variants, and return a subset of variants that can be
2129
+ * adapted between.
2130
+ * @param {!Array<shaka.extern.Variant>} variants
2131
+ * @return {!shaka.media.AdaptationSet}
2132
+ */
2133
+ create(variants) {}
2134
+ /**
2135
+ * Sets the AdaptationSetCriteria configuration.
2136
+ * @param {shaka.media.AdaptationSetCriteria.Configuration} config
2137
+ */
2138
+ configure(config) {}
2139
+ };
2140
+ /**
2141
+ * A factory for creating the AdaptationSetCriteria.
2142
+ * @typedef {function():!shaka.media.AdaptationSetCriteria}
2143
+ */
2144
+ shaka.media.AdaptationSetCriteria.Factory;
2145
+ /**
2146
+ * @typedef {{
2147
+ * language: string,
2148
+ * role: string,
2149
+ * channelCount: number,
2150
+ * hdrLevel: string,
2151
+ * spatialAudio: boolean,
2152
+ * videoLayout: string,
2153
+ * audioLabel: string,
2154
+ * videoLabel: string,
2155
+ * codecSwitchingStrategy: shaka.config.CodecSwitchingStrategy,
2156
+ * audioCodec: string
2157
+ * }}
2158
+ * @property {string} language
2159
+ * The language used to filter variants.
2160
+ * @property {string} role
2161
+ * The adaptation role used to filter variants.
2162
+ * @property {string} channelCount
2163
+ * The audio channel count used to filter variants.
2164
+ * @property {string} hdrLevel
2165
+ * The HDR level used to filter variants.
2166
+ * @property {boolean} spatialAudio
2167
+ * Whether should prefer audio tracks with spatial audio.
2168
+ * @property {string} videoLayout
2169
+ * The video layout used to filter variants.
2170
+ * @property {string} audioLabel
2171
+ * The audio label used to filter variants.
2172
+ * @property {string} videoLabel
2173
+ * The video label used to filter variants.
2174
+ * @property {shaka.config.CodecSwitchingStrategy} codecSwitchingStrategy
2175
+ * The codec switching strategy used to filter variants.
2176
+ * @property {string} audioCodec
2177
+ * The audio codec used to filter variants.
2178
+ */
2179
+ shaka.media.AdaptationSetCriteria.Configuration;
2086
2180
  /**
2087
2181
  * @summary An interface to register manifest parsers.
2088
2182
  */
@@ -2120,7 +2214,7 @@ shaka.media.ManifestParser.AccessibilityPurpose = {
2120
2214
  */
2121
2215
  shaka.media.InitSegmentReference = class {
2122
2216
  /**
2123
- * @param {function():!Array.<string>} uris A function that creates the URIs
2217
+ * @param {function(): !Array<string>} uris A function that creates the URIs
2124
2218
  * of the resource containing the segment.
2125
2219
  * @param {number} startByte The offset from the start of the resource to the
2126
2220
  * start of the segment.
@@ -2159,7 +2253,7 @@ shaka.media.SegmentReference = class {
2159
2253
  * @param {number} endTime The segment's end time in seconds. The segment
2160
2254
  * ends the instant before this time, so |endTime| must be strictly greater
2161
2255
  * than |startTime|.
2162
- * @param {function():!Array.<string>} uris
2256
+ * @param {function(): !Array<string>} uris
2163
2257
  * A function that creates the URIs of the resource containing the segment.
2164
2258
  * @param {number} startByte The offset from the start of the resource to the
2165
2259
  * start of the segment.
@@ -2190,7 +2284,7 @@ shaka.media.SegmentReference = class {
2190
2284
  * The end of the append window for this reference, relative to the
2191
2285
  * presentation. Any content from after this time will be removed by
2192
2286
  * MediaSource.
2193
- * @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
2287
+ * @param {!Array<!shaka.media.SegmentReference>=} partialReferences
2194
2288
  * A list of SegmentReferences for the partial segments.
2195
2289
  * @param {?string=} tilesLayout
2196
2290
  * The value is a grid-item-dimension consisting of two positive decimal
@@ -2215,7 +2309,7 @@ shaka.media.SegmentReference = class {
2215
2309
  constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, aesKey, allPartialSegments) {}
2216
2310
  /**
2217
2311
  * Creates and returns the URIs of the resource containing the segment.
2218
- * @return {!Array.<string>}
2312
+ * @return {!Array<string>}
2219
2313
  */
2220
2314
  getUris() {}
2221
2315
  /**
@@ -2383,7 +2477,7 @@ shaka.util.Id3Utils = class {
2383
2477
  /**
2384
2478
  * Returns an array of ID3 frames found in all the ID3 tags in the id3Data
2385
2479
  * @param {Uint8Array} id3Data - The ID3 data containing one or more ID3 tags
2386
- * @return {!Array.<shaka.extern.MetadataFrame>}
2480
+ * @return {!Array<shaka.extern.MetadataFrame>}
2387
2481
  */
2388
2482
  static getID3Frames(id3Data) {}
2389
2483
  /**
@@ -2397,7 +2491,7 @@ shaka.util.Id3Utils = class {
2397
2491
  };
2398
2492
  /**
2399
2493
  * @summary
2400
- * Parser for exponential Golomb codes, a variable-bitwidth number encoding
2494
+ * Parser for exponential Golomb codes, a variable-bit width number encoding
2401
2495
  * scheme used by h264.
2402
2496
  * Based on https://github.com/videojs/mux.js/blob/main/lib/utils/exp-golomb.js
2403
2497
  */
@@ -2430,7 +2524,7 @@ shaka.util.TsParser = class {
2430
2524
  * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2431
2525
  * @param {shaka.extern.MPEG_PES} pes
2432
2526
  * @param {?shaka.extern.MPEG_PES=} nextPes
2433
- * @return {!Array.<shaka.extern.VideoNalu>}
2527
+ * @return {!Array<shaka.extern.VideoNalu>}
2434
2528
  */
2435
2529
  parseAvcNalus(pes, nextPes) {}
2436
2530
  /**
@@ -2439,23 +2533,23 @@ shaka.util.TsParser = class {
2439
2533
  * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2440
2534
  * @param {shaka.extern.MPEG_PES} pes
2441
2535
  * @param {{nalu: ?shaka.extern.VideoNalu, state: ?number}} lastInfo
2442
- * @return {!Array.<shaka.extern.VideoNalu>}
2536
+ * @return {!Array<shaka.extern.VideoNalu>}
2443
2537
  */
2444
2538
  parseNalus(pes, lastInfo) {}
2445
2539
  /**
2446
2540
  * Return the ID3 metadata
2447
- * @return {!Array.<shaka.extern.ID3Metadata>}
2541
+ * @return {!Array<shaka.extern.ID3Metadata>}
2448
2542
  */
2449
2543
  getMetadata() {}
2450
2544
  /**
2451
2545
  * Return the audio data
2452
- * @return {!Array.<shaka.extern.MPEG_PES>}
2546
+ * @return {!Array<shaka.extern.MPEG_PES>}
2453
2547
  */
2454
2548
  getAudioData() {}
2455
2549
  /**
2456
2550
  * Return the video data
2457
2551
  * @param {boolean=} naluProcessing
2458
- * @return {!Array.<shaka.extern.MPEG_PES>}
2552
+ * @return {!Array<shaka.extern.MPEG_PES>}
2459
2553
  */
2460
2554
  getVideoData(naluProcessing) {}
2461
2555
  /**
@@ -2471,7 +2565,7 @@ shaka.util.TsParser = class {
2471
2565
  getCodecs() {}
2472
2566
  /**
2473
2567
  * Return the video data
2474
- * @return {!Array.<shaka.extern.VideoNalu>}
2568
+ * @return {!Array<shaka.extern.VideoNalu>}
2475
2569
  */
2476
2570
  getVideoNalus() {}
2477
2571
  /**
@@ -2604,7 +2698,7 @@ shaka.media.PresentationTimeline = class {
2604
2698
  * Gives PresentationTimeline a Stream's timeline so it can size and position
2605
2699
  * the segment availability window, and account for missing segment
2606
2700
  * information.
2607
- * @param {!Array.<shaka.media.PresentationTimeline.TimeRange>} timeline
2701
+ * @param {!Array<shaka.media.PresentationTimeline.TimeRange>} timeline
2608
2702
  * @param {number} startOffset
2609
2703
  */
2610
2704
  notifyTimeRange(timeline, startOffset) {}
@@ -2613,7 +2707,7 @@ shaka.media.PresentationTimeline = class {
2613
2707
  * the segment availability window, and account for missing segment
2614
2708
  * information. These segments do not necessarily need to all be from the
2615
2709
  * same stream.
2616
- * @param {!Array.<!shaka.media.SegmentReference>} references
2710
+ * @param {!Array<!shaka.media.SegmentReference>} references
2617
2711
  */
2618
2712
  notifySegments(references) {}
2619
2713
  /**
@@ -2775,11 +2869,11 @@ shaka.media.PresentationTimeline.TimeRange;
2775
2869
  * SegmentIndex.
2776
2870
  * @implements {shaka.extern.SegmentIndex}
2777
2871
  * @implements {shaka.util.IReleasable}
2778
- * @implements {Iterable.<!shaka.media.SegmentReference>}
2872
+ * @implements {Iterable<!shaka.media.SegmentReference>}
2779
2873
  */
2780
2874
  shaka.media.SegmentIndex = class {
2781
2875
  /**
2782
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2876
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
2783
2877
  * SegmentReferences, which must be sorted first by their start times
2784
2878
  * (ascending) and second by their end times (ascending).
2785
2879
  */
@@ -2824,7 +2918,7 @@ shaka.media.SegmentIndex = class {
2824
2918
  * Used, for example, by the DASH and HLS parser, where manifests may not list
2825
2919
  * all available references, so we must keep available references in memory to
2826
2920
  * fill the availability window.
2827
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
2921
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
2828
2922
  * SegmentReferences, which must be sorted first by their start times
2829
2923
  * (ascending) and second by their end times (ascending).
2830
2924
  * @param {number} windowStart The start of the availability window to filter
@@ -2852,7 +2946,7 @@ shaka.media.SegmentIndex = class {
2852
2946
  * Updates the references every so often. Stops when the references list
2853
2947
  * returned by the callback is null.
2854
2948
  * @param {number} interval The interval in seconds.
2855
- * @param {function():Array.<shaka.media.SegmentReference>} updateCallback
2949
+ * @param {function(): Array<shaka.media.SegmentReference>} updateCallback
2856
2950
  */
2857
2951
  updateEvery(interval, updateCallback) {}
2858
2952
  /**
@@ -2866,24 +2960,24 @@ shaka.media.SegmentIndex = class {
2866
2960
  * RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
2867
2961
  * Playlist will contain at least one independent frame."
2868
2962
  * @param {number} time
2869
- * @param {boolean=} allowNonIndepedent
2963
+ * @param {boolean=} allowNonIndependent
2870
2964
  * @param {boolean=} reverse
2871
2965
  * @return {?shaka.media.SegmentIterator}
2872
2966
  */
2873
- getIteratorForTime(time, allowNonIndepedent, reverse) {}
2967
+ getIteratorForTime(time, allowNonIndependent, reverse) {}
2874
2968
  /**
2875
2969
  * Create a SegmentIndex for a single segment of the given start time and
2876
2970
  * duration at the given URIs.
2877
2971
  * @param {number} startTime
2878
2972
  * @param {number} duration
2879
- * @param {!Array.<string>} uris
2973
+ * @param {!Array<string>} uris
2880
2974
  * @return {!shaka.media.SegmentIndex}
2881
2975
  */
2882
2976
  static forSingleSegment(startTime, duration, uris) {}
2883
2977
  };
2884
2978
  /**
2885
2979
  * An iterator over a SegmentIndex's references.
2886
- * @implements {Iterator.<shaka.media.SegmentReference>}
2980
+ * @implements {Iterator<shaka.media.SegmentReference>}
2887
2981
  */
2888
2982
  shaka.media.SegmentIterator = class {
2889
2983
  /**
@@ -2918,7 +3012,7 @@ shaka.media.SegmentIterator = class {
2918
3012
  * Used in constructing multi-Period Streams for DASH.
2919
3013
  * @extends shaka.media.SegmentIndex
2920
3014
  * @implements {shaka.util.IReleasable}
2921
- * @implements {Iterable.<!shaka.media.SegmentReference>}
3015
+ * @implements {Iterable<!shaka.media.SegmentReference>}
2922
3016
  */
2923
3017
  shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
2924
3018
  /** */
@@ -3010,7 +3104,7 @@ shaka.util.ConfigUtils = class {
3010
3104
  shaka.util.FairPlayUtils = class {
3011
3105
  /**
3012
3106
  * Check if FairPlay is supported.
3013
- * @return {!Promise.<boolean>}
3107
+ * @return {!Promise<boolean>}
3014
3108
  */
3015
3109
  static isFairPlaySupported() {}
3016
3110
  /**
@@ -3042,6 +3136,7 @@ shaka.util.FairPlayUtils = class {
3042
3136
  * @param {!Uint8Array} initData
3043
3137
  * @param {string} initDataType
3044
3138
  * @param {?shaka.extern.DrmInfo} drmInfo
3139
+ * @return {!Uint8Array}
3045
3140
  */
3046
3141
  static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
3047
3142
  /**
@@ -3049,6 +3144,7 @@ shaka.util.FairPlayUtils = class {
3049
3144
  * @param {!Uint8Array} initData
3050
3145
  * @param {string} initDataType
3051
3146
  * @param {?shaka.extern.DrmInfo} drmInfo
3147
+ * @return {!Uint8Array}
3052
3148
  */
3053
3149
  static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
3054
3150
  /**
@@ -3056,6 +3152,7 @@ shaka.util.FairPlayUtils = class {
3056
3152
  * @param {!Uint8Array} initData
3057
3153
  * @param {string} initDataType
3058
3154
  * @param {?shaka.extern.DrmInfo} drmInfo
3155
+ * @return {!Uint8Array}
3059
3156
  */
3060
3157
  static conaxInitDataTransform(initData, initDataType, drmInfo) {}
3061
3158
  /**
@@ -3063,6 +3160,7 @@ shaka.util.FairPlayUtils = class {
3063
3160
  * @param {!Uint8Array} initData
3064
3161
  * @param {string} initDataType
3065
3162
  * @param {?shaka.extern.DrmInfo} drmInfo
3163
+ * @return {!Uint8Array}
3066
3164
  */
3067
3165
  static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
3068
3166
  /**
@@ -3109,6 +3207,10 @@ shaka.util.PlayerConfiguration = class {
3109
3207
  * @return {shaka.extern.PlayerConfiguration}
3110
3208
  */
3111
3209
  static createDefault() {}
3210
+ /**
3211
+ * @return {!Object}
3212
+ */
3213
+ static createDefaultForLL() {}
3112
3214
  /**
3113
3215
  * Merges the given configuration changes into the given destination. This
3114
3216
  * uses the default Player configurations as the template.
@@ -3185,9 +3287,9 @@ shaka.text.SimpleTextDisplayer = class {
3185
3287
  enableTextDisplayer() {}
3186
3288
  };
3187
3289
  /**
3188
- * A stub text displayer plugin that does nothing
3189
- * @implements {shaka.extern.TextDisplayer}
3190
- */
3290
+ * A stub text displayer plugin that does nothing
3291
+ * @implements {shaka.extern.TextDisplayer}
3292
+ */
3191
3293
  shaka.text.StubTextDisplayer = class {
3192
3294
  /**
3193
3295
  * @override
@@ -3356,7 +3458,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3356
3458
  static registerSupportPlugin(name, callback) {}
3357
3459
  /**
3358
3460
  * Set a factory to create an ad manager during player construction time.
3359
- * This method needs to be called bafore instantiating the Player class.
3461
+ * This method needs to be called before instantiating the Player class.
3360
3462
  * @param {!shaka.extern.IAdManager.Factory} factory
3361
3463
  */
3362
3464
  static setAdManagerFactory(factory) {}
@@ -3375,7 +3477,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3375
3477
  * NOTE: This may show a request to the user for permission.
3376
3478
  * @see https://bit.ly/2ywccmH
3377
3479
  * @param {boolean=} promptsOkay
3378
- * @return {!Promise.<shaka.extern.SupportType>}
3480
+ * @return {!Promise<shaka.extern.SupportType>}
3379
3481
  */
3380
3482
  static probeSupport(promptsOkay) {}
3381
3483
  /**
@@ -3435,7 +3537,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3435
3537
  * When in src= mode, this unloads but does not make a PreloadManager.
3436
3538
  * @param {boolean=} initializeMediaSource
3437
3539
  * @param {boolean=} keepAdManager
3438
- * @return {!Promise.<?shaka.media.PreloadManager>}
3540
+ * @return {!Promise<?shaka.media.PreloadManager>}
3439
3541
  */
3440
3542
  unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3441
3543
  /**
@@ -3447,7 +3549,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3447
3549
  * attached to something else.
3448
3550
  * @param {boolean=} keepAdManager
3449
3551
  * @param {boolean=} saveLivePosition
3450
- * @return {!Promise.<?shaka.media.PreloadManager>}
3552
+ * @return {!Promise<?shaka.media.PreloadManager>}
3451
3553
  */
3452
3554
  detachAndSavePreload(keepAdManager, saveLivePosition) {}
3453
3555
  /**
@@ -3469,7 +3571,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3469
3571
  * <code>undefined</code>, playback will start at the default start time (0
3470
3572
  * for VOD and liveEdge for LIVE).
3471
3573
  * @param {?string=} mimeType
3472
- * @return {!Promise.<?shaka.media.PreloadManager>}
3574
+ * @return {!Promise<?shaka.media.PreloadManager>}
3473
3575
  */
3474
3576
  preload(assetUri, startTime, mimeType) {}
3475
3577
  /**
@@ -3503,6 +3605,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3503
3605
  * there were invalid entries.
3504
3606
  */
3505
3607
  configure(config, value) {}
3608
+ /**
3609
+ * Changes low latency configuration settings on the Player.
3610
+ * @param {!Object} config This object should follow the
3611
+ * {@link shaka.extern.PlayerConfiguration} object. Not all fields
3612
+ * need to be set; unset fields retain their old values.
3613
+ */
3614
+ configurationForLowLatency(config) {}
3506
3615
  /**
3507
3616
  * Return a copy of the current configuration. Modifications of the returned
3508
3617
  * value will not affect the Player's active configuration. You must call
@@ -3510,6 +3619,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3510
3619
  * @return {shaka.extern.PlayerConfiguration}
3511
3620
  */
3512
3621
  getConfiguration() {}
3622
+ /**
3623
+ * Return a copy of the current configuration for low latency.
3624
+ * @return {!Object}
3625
+ */
3626
+ getConfigurationForLowLatency() {}
3513
3627
  /**
3514
3628
  * Return a copy of the current non default configuration. Modifications of
3515
3629
  * the returned value will not affect the Player's active configuration.
@@ -3623,7 +3737,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3623
3737
  getExpiration() {}
3624
3738
  /**
3625
3739
  * Returns the active sessions metadata
3626
- * @return {!Array.<shaka.extern.DrmSessionMetadata>}
3740
+ * @return {!Array<shaka.extern.DrmSessionMetadata>}
3627
3741
  */
3628
3742
  getActiveSessionsMetadata() {}
3629
3743
  /**
@@ -3674,27 +3788,27 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3674
3788
  * Return a list of variant tracks that can be switched to.
3675
3789
  * <p>
3676
3790
  * If the player has not loaded content, this will return an empty list.
3677
- * @return {!Array.<shaka.extern.Track>}
3791
+ * @return {!Array<shaka.extern.Track>}
3678
3792
  */
3679
3793
  getVariantTracks() {}
3680
3794
  /**
3681
3795
  * Return a list of text tracks that can be switched to.
3682
3796
  * <p>
3683
3797
  * If the player has not loaded content, this will return an empty list.
3684
- * @return {!Array.<shaka.extern.Track>}
3798
+ * @return {!Array<shaka.extern.Track>}
3685
3799
  */
3686
3800
  getTextTracks() {}
3687
3801
  /**
3688
3802
  * Return a list of image tracks that can be switched to.
3689
3803
  * If the player has not loaded content, this will return an empty list.
3690
- * @return {!Array.<shaka.extern.Track>}
3804
+ * @return {!Array<shaka.extern.Track>}
3691
3805
  */
3692
3806
  getImageTracks() {}
3693
3807
  /**
3694
3808
  * Returns Thumbnail objects for each thumbnail for a given image track ID.
3695
3809
  * If the player has not loaded content, this will return a null.
3696
3810
  * @param {number} trackId
3697
- * @return {!Promise.<?Array<!shaka.extern.Thumbnail>>}
3811
+ * @return {!Promise<?Array<!shaka.extern.Thumbnail>>}
3698
3812
  */
3699
3813
  getAllThumbnails(trackId) {}
3700
3814
  /**
@@ -3702,7 +3816,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3702
3816
  * If the player has not loaded content, this will return a null.
3703
3817
  * @param {number} trackId
3704
3818
  * @param {number} time
3705
- * @return {!Promise.<?shaka.extern.Thumbnail>}
3819
+ * @return {!Promise<?shaka.extern.Thumbnail>}
3706
3820
  */
3707
3821
  getThumbnails(trackId, time) {}
3708
3822
  /**
@@ -3743,25 +3857,25 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3743
3857
  /**
3744
3858
  * Return a list of audio language-role combinations available. If the
3745
3859
  * player has not loaded any content, this will return an empty list.
3746
- * @return {!Array.<shaka.extern.LanguageRole>}
3860
+ * @return {!Array<shaka.extern.LanguageRole>}
3747
3861
  */
3748
3862
  getAudioLanguagesAndRoles() {}
3749
3863
  /**
3750
3864
  * Return a list of text language-role combinations available. If the player
3751
3865
  * has not loaded any content, this will be return an empty list.
3752
- * @return {!Array.<shaka.extern.LanguageRole>}
3866
+ * @return {!Array<shaka.extern.LanguageRole>}
3753
3867
  */
3754
3868
  getTextLanguagesAndRoles() {}
3755
3869
  /**
3756
3870
  * Return a list of audio languages available. If the player has not loaded
3757
3871
  * any content, this will return an empty list.
3758
- * @return {!Array.<string>}
3872
+ * @return {!Array<string>}
3759
3873
  */
3760
3874
  getAudioLanguages() {}
3761
3875
  /**
3762
3876
  * Return a list of text languages available. If the player has not loaded
3763
3877
  * any content, this will return an empty list.
3764
- * @return {!Array.<string>}
3878
+ * @return {!Array<string>}
3765
3879
  */
3766
3880
  getTextLanguages() {}
3767
3881
  /**
@@ -3805,13 +3919,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3805
3919
  isTextTrackVisible() {}
3806
3920
  /**
3807
3921
  * Return a list of chapters tracks.
3808
- * @return {!Array.<shaka.extern.Track>}
3922
+ * @return {!Array<shaka.extern.Track>}
3809
3923
  */
3810
3924
  getChaptersTracks() {}
3811
3925
  /**
3812
3926
  * This returns the list of chapters.
3813
3927
  * @param {string} language
3814
- * @return {!Array.<shaka.extern.Chapter>}
3928
+ * @return {!Array<shaka.extern.Chapter>}
3815
3929
  */
3816
3930
  getChapters(language) {}
3817
3931
  /**
@@ -3862,7 +3976,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3862
3976
  * @param {string=} codec
3863
3977
  * @param {string=} label
3864
3978
  * @param {boolean=} forced
3865
- * @return {!Promise.<shaka.extern.Track>}
3979
+ * @return {!Promise<shaka.extern.Track>}
3866
3980
  */
3867
3981
  addTextTrackAsync(uri, language, kind, mimeType, codec, label, forced) {}
3868
3982
  /**
@@ -3873,7 +3987,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3873
3987
  * application.
3874
3988
  * @param {string} uri
3875
3989
  * @param {string=} mimeType
3876
- * @return {!Promise.<shaka.extern.Track>}
3990
+ * @return {!Promise<shaka.extern.Track>}
3877
3991
  */
3878
3992
  addThumbnailsTrack(uri, mimeType) {}
3879
3993
  /**
@@ -3883,7 +3997,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3883
3997
  * @param {string} uri
3884
3998
  * @param {string} language
3885
3999
  * @param {string=} mimeType
3886
- * @return {!Promise.<shaka.extern.Track>}
4000
+ * @return {!Promise<shaka.extern.Track>}
3887
4001
  */
3888
4002
  addChaptersTrack(uri, language, mimeType) {}
3889
4003
  /**
@@ -4305,15 +4419,156 @@ shaka.ads.Utils.AD_CONTENT_ATTACH_REQUESTED;
4305
4419
  shaka.ads.InterstitialAd = class {
4306
4420
  /**
4307
4421
  * @param {HTMLMediaElement} video
4308
- * @param {boolean} isSkippable
4309
- * @param {?number} skipOffset
4310
- * @param {?number} skipFor
4422
+ * @param {shaka.extern.AdInterstitial} interstitial
4311
4423
  * @param {function()} onSkip
4312
4424
  * @param {number} sequenceLength
4313
4425
  * @param {number} adPosition
4314
4426
  * @param {boolean} isUsingAnotherMediaElement
4315
4427
  */
4316
- constructor(video, isSkippable, skipOffset, skipFor, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4428
+ constructor(video, interstitial, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4429
+ /**
4430
+ * @override
4431
+ */
4432
+ needsSkipUI() {}
4433
+ /**
4434
+ * @override
4435
+ */
4436
+ isClientRendering() {}
4437
+ /**
4438
+ * @override
4439
+ */
4440
+ isUsingAnotherMediaElement() {}
4441
+ /**
4442
+ * @override
4443
+ */
4444
+ getDuration() {}
4445
+ /**
4446
+ * @override
4447
+ */
4448
+ getMinSuggestedDuration() {}
4449
+ /**
4450
+ * @override
4451
+ */
4452
+ getRemainingTime() {}
4453
+ /**
4454
+ * @override
4455
+ */
4456
+ isPaused() {}
4457
+ /**
4458
+ * @override
4459
+ */
4460
+ isSkippable() {}
4461
+ /**
4462
+ * @override
4463
+ */
4464
+ getTimeUntilSkippable() {}
4465
+ /**
4466
+ * @override
4467
+ */
4468
+ canSkipNow() {}
4469
+ /**
4470
+ * @override
4471
+ */
4472
+ skip() {}
4473
+ /**
4474
+ * @override
4475
+ */
4476
+ pause() {}
4477
+ /**
4478
+ * @override
4479
+ */
4480
+ play() {}
4481
+ /**
4482
+ * @override
4483
+ */
4484
+ getVolume() {}
4485
+ /**
4486
+ * @override
4487
+ */
4488
+ setVolume(volume) {}
4489
+ /**
4490
+ * @override
4491
+ */
4492
+ isMuted() {}
4493
+ /**
4494
+ * @override
4495
+ */
4496
+ isLinear() {}
4497
+ /**
4498
+ * @override
4499
+ */
4500
+ resize(width, height) {}
4501
+ /**
4502
+ * @override
4503
+ */
4504
+ setMuted(muted) {}
4505
+ /**
4506
+ * @override
4507
+ */
4508
+ getSequenceLength() {}
4509
+ /**
4510
+ * @override
4511
+ */
4512
+ getPositionInSequence() {}
4513
+ /**
4514
+ * @override
4515
+ */
4516
+ getTitle() {}
4517
+ /**
4518
+ * @override
4519
+ */
4520
+ getDescription() {}
4521
+ /**
4522
+ * @override
4523
+ */
4524
+ getVastMediaBitrate() {}
4525
+ /**
4526
+ * @override
4527
+ */
4528
+ getVastMediaHeight() {}
4529
+ /**
4530
+ * @override
4531
+ */
4532
+ getVastMediaWidth() {}
4533
+ /**
4534
+ * @override
4535
+ */
4536
+ getAdId() {}
4537
+ /**
4538
+ * @override
4539
+ */
4540
+ getCreativeAdId() {}
4541
+ /**
4542
+ * @override
4543
+ */
4544
+ getAdvertiserName() {}
4545
+ /**
4546
+ * @override
4547
+ */
4548
+ getMediaUrl() {}
4549
+ /**
4550
+ * @override
4551
+ */
4552
+ getTimeOffset() {}
4553
+ /**
4554
+ * @override
4555
+ */
4556
+ getPodIndex() {}
4557
+ /**
4558
+ * @override
4559
+ */
4560
+ release() {}
4561
+ };
4562
+ /**
4563
+ * @implements {shaka.extern.IAd}
4564
+ */
4565
+ shaka.ads.InterstitialStaticAd = class {
4566
+ /**
4567
+ * @param {shaka.extern.AdInterstitial} interstitial
4568
+ * @param {number} sequenceLength
4569
+ * @param {number} adPosition
4570
+ */
4571
+ constructor(interstitial, sequenceLength, adPosition) {}
4317
4572
  /**
4318
4573
  * @override
4319
4574
  */
@@ -4455,6 +4710,7 @@ shaka.ads.MediaTailorAd = class {
4455
4710
  * @param {mediaTailor.Ad} mediaTailorAd
4456
4711
  * @param {number} adPosition
4457
4712
  * @param {number} totalAds
4713
+ * @param {boolean} isLinear
4458
4714
  * @param {HTMLMediaElement} video
4459
4715
  */
4460
4716
  constructor(mediaTailorAd, adPosition, totalAds, isLinear, video) {}
@@ -4762,8 +5018,8 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4762
5018
  */
4763
5019
  release() {}
4764
5020
  /**
4765
- * @override
4766
- */
5021
+ * @override
5022
+ */
4767
5023
  onAssetUnload() {}
4768
5024
  /**
4769
5025
  * @override
@@ -4781,7 +5037,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4781
5037
  * @param {string} url
4782
5038
  * @param {Object} adsParams
4783
5039
  * @param {string=} backupUrl
4784
- * @return {!Promise.<string>}
5040
+ * @return {!Promise<string>}
4785
5041
  * @override
4786
5042
  */
4787
5043
  requestMediaTailorStream(url, adsParams, backupUrl) {}
@@ -4797,7 +5053,7 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4797
5053
  /**
4798
5054
  * @param {!google.ima.dai.api.StreamRequest} imaRequest
4799
5055
  * @param {string=} backupUrl
4800
- * @return {!Promise.<string>}
5056
+ * @return {!Promise<string>}
4801
5057
  * @override
4802
5058
  */
4803
5059
  requestServerSideStream(imaRequest, backupUrl) {}
@@ -4806,12 +5062,12 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4806
5062
  */
4807
5063
  replaceServerSideAdTagParameters(adTagParameters) {}
4808
5064
  /**
4809
- * @return {!Array.<!shaka.extern.AdCuePoint>}
5065
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4810
5066
  * @override
4811
5067
  */
4812
5068
  getServerSideCuePoints() {}
4813
5069
  /**
4814
- * @return {!Array.<!shaka.extern.AdCuePoint>}
5070
+ * @return {!Array<!shaka.extern.AdCuePoint>}
4815
5071
  * @override
4816
5072
  */
4817
5073
  getCuePoints() {}
@@ -4852,6 +5108,10 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
4852
5108
  * @override
4853
5109
  */
4854
5110
  addAdUrlInterstitial(url) {}
5111
+ /**
5112
+ * @override
5113
+ */
5114
+ getInterstitialPlayer() {}
4855
5115
  };
4856
5116
  /**
4857
5117
  * The event name for when a sequence of ads has been loaded.
@@ -5278,15 +5538,15 @@ shaka.util.PeriodCombiner = class {
5278
5538
  /** */
5279
5539
  constructor() {}
5280
5540
  /**
5281
- * @return {!Array.<shaka.extern.Variant>}
5541
+ * @return {!Array<shaka.extern.Variant>}
5282
5542
  */
5283
5543
  getVariants() {}
5284
5544
  /**
5285
- * @return {!Array.<shaka.extern.Stream>}
5286
- */
5545
+ * @return {!Array<shaka.extern.Stream>}
5546
+ */
5287
5547
  getTextStreams() {}
5288
5548
  /**
5289
- * @return {!Array.<shaka.extern.Stream>}
5549
+ * @return {!Array<shaka.extern.Stream>}
5290
5550
  */
5291
5551
  getImageStreams() {}
5292
5552
  /**
@@ -5296,7 +5556,7 @@ shaka.util.PeriodCombiner = class {
5296
5556
  */
5297
5557
  deleteStream(stream, periodId) {}
5298
5558
  /**
5299
- * @param {!Array.<shaka.extern.Period>} periods
5559
+ * @param {!Array<shaka.extern.Period>} periods
5300
5560
  * @param {boolean} isDynamic
5301
5561
  * @param {boolean=} isPatchUpdate
5302
5562
  * @return {!Promise}
@@ -5309,7 +5569,7 @@ shaka.util.PeriodCombiner = class {
5309
5569
  setAllowMultiTypeVariants(allowed) {}
5310
5570
  /**
5311
5571
  * @param {boolean} useOnce if true, stream will be used only once in period
5312
- * flattening algoritnm.
5572
+ * flattening algorithm.
5313
5573
  */
5314
5574
  setUseStreamOnce(useOnce) {}
5315
5575
  };
@@ -5643,9 +5903,9 @@ shaka.offline.Storage = class {
5643
5903
  * refer to {@link https://bit.ly/StructClone}
5644
5904
  * @param {?string=} mimeType
5645
5905
  * The mime type for the content |manifestUri| points to.
5646
- * @param {?Array.<string>=} externalThumbnails
5906
+ * @param {?Array<string>=} externalThumbnails
5647
5907
  * The external thumbnails to store along the main content.
5648
- * @param {?Array.<shaka.extern.ExtraText>=} externalText
5908
+ * @param {?Array<shaka.extern.ExtraText>=} externalText
5649
5909
  * The external text to store along the main content.
5650
5910
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.StoredContent>}
5651
5911
  * An AbortableOperation that resolves with a structure representing what
@@ -5666,12 +5926,12 @@ shaka.offline.Storage = class {
5666
5926
  /**
5667
5927
  * Removes any EME sessions that were not successfully removed before. This
5668
5928
  * returns whether all the sessions were successfully removed.
5669
- * @return {!Promise.<boolean>}
5929
+ * @return {!Promise<boolean>}
5670
5930
  */
5671
5931
  removeEmeSessions() {}
5672
5932
  /**
5673
5933
  * Lists all the stored content available.
5674
- * @return {!Promise.<!Array.<shaka.extern.StoredContent>>} A Promise to an
5934
+ * @return {!Promise<!Array<shaka.extern.StoredContent>>} A Promise to an
5675
5935
  * array of structures representing all stored content. The "offlineUri"
5676
5936
  * member of the structure is the URI that should be given to Player.load()
5677
5937
  * to play this piece of content offline. The "appMetadata" member is the
@@ -5815,18 +6075,6 @@ shaka.polyfill.PatchedMediaKeysCert = class {
5815
6075
  */
5816
6076
  static install() {}
5817
6077
  };
5818
- /**
5819
- * @summary A polyfill to stub out
5820
- * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on browsers without
5821
- * EME.
5822
- * All methods will fail.
5823
- */
5824
- shaka.polyfill.PatchedMediaKeysNop = class {
5825
- /**
5826
- * Installs the polyfill if needed.
5827
- */
5828
- static install() {}
5829
- };
5830
6078
  /**
5831
6079
  * @summary A polyfill to implement
5832
6080
  * {@link https://bit.ly/EmeMar15 EME draft 12 March 2015} on top of
@@ -6464,8 +6712,8 @@ shaka.ui.RangeElement = class extends shaka.ui.Element {
6464
6712
  /**
6465
6713
  * @param {!HTMLElement} parent
6466
6714
  * @param {!shaka.ui.Controls} controls
6467
- * @param {!Array.<string>} containerClassNames
6468
- * @param {!Array.<string>} barClassNames
6715
+ * @param {!Array<string>} containerClassNames
6716
+ * @param {!Array<string>} barClassNames
6469
6717
  */
6470
6718
  constructor(parent, controls, containerClassNames, barClassNames) {}
6471
6719
  /**
@@ -6782,6 +7030,31 @@ shaka.ui.AirPlayButton = class extends shaka.ui.Element {
6782
7030
  */
6783
7031
  constructor(parent, controls) {}
6784
7032
  };
7033
+ /**
7034
+ * A UI component that adds watermark functionality to the Shaka Player.
7035
+ * Allows adding text watermarks with various customization options.
7036
+ * @extends {shaka.ui.Element}
7037
+ * @final
7038
+ */
7039
+ shaka.ui.Watermark = class extends shaka.ui.Element {
7040
+ /**
7041
+ * Creates a new Watermark instance.
7042
+ * @param {!HTMLElement} parent The parent element for the watermark canvas
7043
+ * @param {!shaka.ui.Controls} controls The controls instance
7044
+ */
7045
+ constructor(parent, controls) {}
7046
+ /**
7047
+ * Sets a text watermark on the video with customizable options.
7048
+ * The watermark can be either static (fixed position) or dynamic (moving).
7049
+ * @param {string} text The text to display as watermark
7050
+ * @param {?shaka.ui.Watermark.Options=} options configuration options
7051
+ */
7052
+ setTextWatermark(text, options) {}
7053
+ /**
7054
+ * Removes the current watermark from the video and stops any animations.
7055
+ */
7056
+ removeWatermark() {}
7057
+ };
6785
7058
  /**
6786
7059
  * @implements {shaka.util.IDestroyable}
6787
7060
  */
@@ -6824,6 +7097,14 @@ shaka.ui.Overlay = class {
6824
7097
  * @param {boolean} enabled
6825
7098
  */
6826
7099
  setEnabled(enabled) {}
7100
+ /**
7101
+ * @param {string} text
7102
+ * @param {?shaka.ui.Watermark.Options=} options
7103
+ */
7104
+ setTextWatermark(text, options) {}
7105
+ /**
7106
+ */
7107
+ removeWatermark() {}
6827
7108
  };
6828
7109
  /**
6829
7110
  * Describes what information should show up in labels for selecting audio