shaka-player 4.12.8 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/AUTHORS +1 -0
  2. package/CONTRIBUTORS +4 -0
  3. package/README.md +22 -21
  4. package/cspell.config.yaml +18 -0
  5. package/dist/controls.css +1 -1
  6. package/dist/controls.css.map +1 -1
  7. package/dist/deps.js +29 -24
  8. package/dist/locales.js +33 -33
  9. package/dist/shaka-player.compiled.d.ts +138 -36
  10. package/dist/shaka-player.compiled.debug.d.ts +138 -36
  11. package/dist/shaka-player.compiled.debug.externs.js +367 -107
  12. package/dist/shaka-player.compiled.debug.js +828 -765
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +367 -107
  15. package/dist/shaka-player.compiled.js +1451 -1416
  16. package/dist/shaka-player.compiled.map +4 -4
  17. package/dist/shaka-player.ui.d.ts +172 -38
  18. package/dist/shaka-player.ui.debug.d.ts +172 -38
  19. package/dist/shaka-player.ui.debug.externs.js +406 -113
  20. package/dist/shaka-player.ui.debug.js +842 -766
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +406 -113
  23. package/dist/shaka-player.ui.js +1670 -1628
  24. package/dist/shaka-player.ui.map +4 -4
  25. package/eslint.config.mjs +343 -0
  26. package/externs/airplay.js +1 -1
  27. package/externs/audiotrack.js +1 -1
  28. package/externs/awesomplete.js +1 -1
  29. package/externs/cast-sdk-v2.js +2 -2
  30. package/externs/cmcd.js +16 -1
  31. package/externs/device_sensor_event.js +1 -1
  32. package/externs/ima.js +8 -8
  33. package/externs/isoboxer.js +31 -31
  34. package/externs/jwk_set.js +1 -1
  35. package/externs/lcevc.js +8 -8
  36. package/externs/mediakeys.js +1 -1
  37. package/externs/mediasession.js +3 -2
  38. package/externs/mediatailor.js +18 -18
  39. package/externs/pictureinpicture.js +41 -1
  40. package/externs/playstation.js +2 -2
  41. package/externs/prefixed_eme.js +1 -1
  42. package/externs/shaka/abortable.js +4 -4
  43. package/externs/shaka/abr_manager.js +1 -1
  44. package/externs/shaka/ads.js +45 -6
  45. package/externs/shaka/cea.js +2 -2
  46. package/externs/shaka/codecs.js +4 -4
  47. package/externs/shaka/drm_info.js +6 -6
  48. package/externs/shaka/error.js +5 -5
  49. package/externs/shaka/manifest.js +51 -56
  50. package/externs/shaka/manifest_parser.js +3 -9
  51. package/externs/shaka/net.js +23 -20
  52. package/externs/shaka/offline.js +37 -37
  53. package/externs/shaka/offline_compat_v1.js +10 -10
  54. package/externs/shaka/offline_compat_v2.js +10 -10
  55. package/externs/shaka/player.js +139 -109
  56. package/externs/shaka/text.js +10 -3
  57. package/externs/shaka/transmuxer.js +1 -1
  58. package/externs/videotrack.js +1 -1
  59. package/lib/abr/ewma.js +1 -1
  60. package/lib/abr/simple_abr_manager.js +70 -22
  61. package/lib/ads/ad_manager.js +43 -18
  62. package/lib/ads/ad_utils.js +160 -58
  63. package/lib/ads/ads_stats.js +1 -1
  64. package/lib/ads/client_side_ad_manager.js +2 -2
  65. package/lib/ads/interstitial_ad.js +16 -11
  66. package/lib/ads/interstitial_ad_manager.js +419 -72
  67. package/lib/ads/interstitial_static_ad.js +299 -0
  68. package/lib/ads/media_tailor_ad.js +1 -0
  69. package/lib/ads/media_tailor_ad_manager.js +37 -36
  70. package/lib/ads/server_side_ad_manager.js +7 -6
  71. package/lib/cast/cast_receiver.js +5 -3
  72. package/lib/cast/cast_sender.js +2 -2
  73. package/lib/cast/cast_utils.js +20 -13
  74. package/lib/cea/cea608_data_channel.js +53 -53
  75. package/lib/cea/cea708_service.js +42 -40
  76. package/lib/cea/cea708_window.js +5 -2
  77. package/lib/cea/cea_decoder.js +5 -7
  78. package/lib/cea/mp4_cea_parser.js +1 -1
  79. package/lib/cea/sei_processor.js +1 -1
  80. package/lib/dash/content_protection.js +62 -192
  81. package/lib/dash/dash_parser.js +119 -119
  82. package/lib/dash/mpd_utils.js +14 -13
  83. package/lib/dash/segment_base.js +5 -5
  84. package/lib/dash/segment_list.js +10 -10
  85. package/lib/dash/segment_template.js +55 -53
  86. package/lib/debug/log.js +2 -2
  87. package/lib/dependencies/all.js +2 -1
  88. package/lib/{media → drm}/drm_engine.js +274 -143
  89. package/lib/{util → drm}/drm_utils.js +20 -11
  90. package/lib/drm/playready.js +233 -0
  91. package/lib/hls/hls_classes.js +14 -14
  92. package/lib/hls/hls_parser.js +257 -196
  93. package/lib/hls/hls_utils.js +14 -14
  94. package/lib/hls/manifest_text_parser.js +10 -10
  95. package/lib/media/adaptation_set.js +6 -5
  96. package/lib/media/adaptation_set_criteria.js +51 -379
  97. package/lib/media/buffering_observer.js +5 -4
  98. package/lib/media/closed_caption_parser.js +2 -2
  99. package/lib/media/content_workarounds.js +2 -2
  100. package/lib/media/example_based_criteria.js +69 -0
  101. package/lib/media/gap_jumping_controller.js +14 -1
  102. package/lib/media/manifest_filterer.js +8 -8
  103. package/lib/media/manifest_parser.js +2 -2
  104. package/lib/media/media_source_capabilities.js +20 -1
  105. package/lib/media/media_source_engine.js +84 -35
  106. package/lib/media/mp4_segment_index_parser.js +5 -5
  107. package/lib/media/playhead.js +2 -8
  108. package/lib/media/playhead_observer.js +1 -1
  109. package/lib/media/preference_based_criteria.js +333 -0
  110. package/lib/media/preload_manager.js +53 -37
  111. package/lib/media/presentation_timeline.js +2 -2
  112. package/lib/media/quality_observer.js +35 -35
  113. package/lib/media/region_observer.js +2 -2
  114. package/lib/media/region_timeline.js +3 -3
  115. package/lib/media/segment_index.js +14 -14
  116. package/lib/media/segment_prefetch.js +17 -13
  117. package/lib/media/segment_reference.js +7 -7
  118. package/lib/media/segment_utils.js +9 -9
  119. package/lib/media/streaming_engine.js +77 -38
  120. package/lib/media/time_ranges_utils.js +1 -1
  121. package/lib/media/video_wrapper.js +1 -1
  122. package/lib/media/webm_segment_index_parser.js +4 -4
  123. package/lib/mss/content_protection.js +17 -222
  124. package/lib/mss/mss_parser.js +23 -24
  125. package/lib/net/data_uri_plugin.js +1 -0
  126. package/lib/net/http_fetch_plugin.js +8 -7
  127. package/lib/net/http_plugin_utils.js +5 -2
  128. package/lib/net/http_xhr_plugin.js +4 -3
  129. package/lib/net/networking_engine.js +72 -17
  130. package/lib/net/networking_utils.js +5 -2
  131. package/lib/offline/download_info.js +5 -1
  132. package/lib/offline/download_manager.js +15 -4
  133. package/lib/offline/download_progress_estimator.js +1 -1
  134. package/lib/offline/indexeddb/base_storage_cell.js +9 -9
  135. package/lib/offline/indexeddb/db_connection.js +1 -1
  136. package/lib/offline/indexeddb/db_operation.js +2 -2
  137. package/lib/offline/indexeddb/eme_session_storage_cell.js +1 -1
  138. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  139. package/lib/offline/indexeddb/v1_storage_cell.js +3 -3
  140. package/lib/offline/indexeddb/v2_storage_cell.js +2 -2
  141. package/lib/offline/manifest_converter.js +11 -12
  142. package/lib/offline/offline_scheme.js +8 -4
  143. package/lib/offline/session_deleter.js +11 -11
  144. package/lib/offline/storage.js +137 -88
  145. package/lib/offline/storage_muxer.js +8 -8
  146. package/lib/offline/stored_content_utils.js +3 -3
  147. package/lib/offline/stream_bandwidth_estimator.js +1 -1
  148. package/lib/player.js +291 -207
  149. package/lib/polyfill/all.js +1 -1
  150. package/lib/polyfill/media_capabilities.js +5 -5
  151. package/lib/polyfill/patchedmediakeys_apple.js +6 -6
  152. package/lib/polyfill/patchedmediakeys_webkit.js +8 -8
  153. package/lib/polyfill/video_play_promise.js +0 -1
  154. package/lib/text/cue.js +3 -2
  155. package/lib/text/lrc_text_parser.js +1 -1
  156. package/lib/text/mp4_ttml_parser.js +1 -1
  157. package/lib/text/mp4_vtt_parser.js +3 -3
  158. package/lib/text/sbv_text_parser.js +1 -1
  159. package/lib/text/simple_text_displayer.js +37 -10
  160. package/lib/text/ssa_text_parser.js +3 -1
  161. package/lib/text/stub_text_displayer.js +12 -5
  162. package/lib/text/text_engine.js +5 -4
  163. package/lib/text/text_utils.js +4 -4
  164. package/lib/text/ttml_text_parser.js +21 -20
  165. package/lib/text/ui_text_displayer.js +20 -13
  166. package/lib/text/vtt_text_parser.js +10 -10
  167. package/lib/text/web_vtt_generator.js +2 -2
  168. package/lib/transmuxer/aac_transmuxer.js +2 -2
  169. package/lib/transmuxer/ac3_transmuxer.js +2 -2
  170. package/lib/transmuxer/adts.js +2 -0
  171. package/lib/transmuxer/ec3.js +3 -3
  172. package/lib/transmuxer/ec3_transmuxer.js +2 -2
  173. package/lib/transmuxer/h264.js +5 -5
  174. package/lib/transmuxer/h265.js +3 -3
  175. package/lib/transmuxer/mp3_transmuxer.js +2 -2
  176. package/lib/transmuxer/mpeg_audio.js +6 -6
  177. package/lib/transmuxer/mss_transmuxer.js +2 -0
  178. package/lib/transmuxer/transmuxer_engine.js +1 -1
  179. package/lib/transmuxer/ts_transmuxer.js +10 -10
  180. package/lib/util/abortable_operation.js +10 -10
  181. package/lib/util/array_utils.js +6 -6
  182. package/lib/util/cmcd_manager.js +149 -18
  183. package/lib/util/cmsd_manager.js +11 -11
  184. package/lib/util/config_utils.js +3 -3
  185. package/lib/util/content_steering_manager.js +17 -17
  186. package/lib/util/data_view_reader.js +3 -3
  187. package/lib/util/ebml_parser.js +1 -1
  188. package/lib/util/error.js +11 -6
  189. package/lib/util/event_manager.js +1 -1
  190. package/lib/util/exp_golomb.js +1 -1
  191. package/lib/util/fairplay_utils.js +6 -1
  192. package/lib/util/fake_event.js +3 -2
  193. package/lib/util/fake_event_target.js +1 -1
  194. package/lib/util/functional.js +8 -8
  195. package/lib/util/id3_utils.js +1 -1
  196. package/lib/util/iterables.js +6 -6
  197. package/lib/util/language_utils.js +17 -17
  198. package/lib/util/manifest_parser_utils.js +13 -13
  199. package/lib/util/map_utils.js +6 -6
  200. package/lib/util/media_ready_state_utils.js +1 -1
  201. package/lib/util/mime_utils.js +15 -4
  202. package/lib/util/mp4_box_parsers.js +5 -5
  203. package/lib/util/mp4_generator.js +31 -30
  204. package/lib/util/mp4_parser.js +2 -2
  205. package/lib/util/multi_map.js +5 -5
  206. package/lib/util/mutex.js +1 -1
  207. package/lib/util/networking.js +1 -1
  208. package/lib/util/object_utils.js +5 -1
  209. package/lib/util/operation_manager.js +1 -1
  210. package/lib/util/periods.js +24 -24
  211. package/lib/util/platform.js +8 -4
  212. package/lib/util/player_configuration.js +50 -17
  213. package/lib/util/pssh.js +34 -6
  214. package/lib/util/public_promise.js +2 -2
  215. package/lib/util/state_history.js +2 -2
  216. package/lib/util/stream_utils.js +138 -120
  217. package/lib/util/string_utils.js +4 -3
  218. package/lib/util/switch_history.js +2 -2
  219. package/lib/util/tXml.js +22 -17
  220. package/lib/util/text_parser.js +2 -2
  221. package/lib/util/timer.js +1 -1
  222. package/lib/util/ts_parser.js +22 -22
  223. package/lib/util/xml_utils.js +1 -0
  224. package/package.json +7 -4
  225. package/project-words.txt +485 -0
  226. package/shaka-player.uncompiled.js +1 -1
  227. package/third_party/closure-uri/uri.js +2 -2
  228. package/third_party/closure-uri/utils.js +2 -2
  229. package/third_party/language-mapping-list/language-mapping-list.js +1 -1
  230. package/ui/ad_statistics_button.js +9 -5
  231. package/ui/airplay_button.js +1 -0
  232. package/ui/audio_language_selection.js +2 -1
  233. package/ui/context_menu.js +2 -2
  234. package/ui/controls.js +7 -7
  235. package/ui/externs/ui.js +29 -21
  236. package/ui/externs/watermark.js +64 -0
  237. package/ui/fast_forward_button.js +1 -1
  238. package/ui/gl_matrix/matrix_4x4.js +11 -5
  239. package/ui/hidden_fast_forward_button.js +1 -1
  240. package/ui/hidden_seek_button.js +1 -1
  241. package/ui/language_utils.js +27 -26
  242. package/ui/less/buttons.less +2 -2
  243. package/ui/localization.js +21 -21
  244. package/ui/loop_button.js +2 -2
  245. package/ui/overflow_menu.js +2 -2
  246. package/ui/playback_rate_selection.js +1 -1
  247. package/ui/presentation_time.js +4 -1
  248. package/ui/range_element.js +2 -2
  249. package/ui/resolution_selection.js +42 -6
  250. package/ui/rewind_button.js +1 -1
  251. package/ui/seek_bar.js +5 -5
  252. package/ui/statistics_button.js +8 -4
  253. package/ui/text_selection.js +3 -2
  254. package/ui/ui.js +32 -2
  255. package/ui/vr_manager.js +3 -3
  256. package/ui/vr_utils.js +14 -14
  257. package/ui/vr_webgl.js +5 -5
  258. package/ui/watermark.js +313 -0
  259. package/.eslintignore +0 -4
  260. package/.eslintrc.js +0 -310
  261. package/lib/polyfill/patchedmediakeys_nop.js +0 -148
@@ -20,12 +20,12 @@ goog.require('shaka.util.Timer');
20
20
  *
21
21
  * @implements {shaka.extern.SegmentIndex}
22
22
  * @implements {shaka.util.IReleasable}
23
- * @implements {Iterable.<!shaka.media.SegmentReference>}
23
+ * @implements {Iterable<!shaka.media.SegmentReference>}
24
24
  * @export
25
25
  */
26
26
  shaka.media.SegmentIndex = class {
27
27
  /**
28
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
28
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
29
29
  * SegmentReferences, which must be sorted first by their start times
30
30
  * (ascending) and second by their end times (ascending).
31
31
  */
@@ -34,7 +34,7 @@ shaka.media.SegmentIndex = class {
34
34
  shaka.media.SegmentIndex.assertCorrectReferences_(references);
35
35
  }
36
36
 
37
- /** @protected {!Array.<!shaka.media.SegmentReference>} */
37
+ /** @protected {!Array<!shaka.media.SegmentReference>} */
38
38
  this.references = references;
39
39
 
40
40
  /** @private {shaka.util.Timer} */
@@ -213,7 +213,7 @@ shaka.media.SegmentIndex = class {
213
213
  * all available references, so we must keep available references in memory to
214
214
  * fill the availability window.
215
215
  *
216
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
216
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
217
217
  * SegmentReferences, which must be sorted first by their start times
218
218
  * (ascending) and second by their end times (ascending).
219
219
  */
@@ -254,7 +254,7 @@ shaka.media.SegmentIndex = class {
254
254
  * all available references, so we must keep available references in memory to
255
255
  * fill the availability window.
256
256
  *
257
- * @param {!Array.<!shaka.media.SegmentReference>} references The list of
257
+ * @param {!Array<!shaka.media.SegmentReference>} references The list of
258
258
  * SegmentReferences, which must be sorted first by their start times
259
259
  * (ascending) and second by their end times (ascending).
260
260
  * @param {number} windowStart The start of the availability window to filter
@@ -389,7 +389,7 @@ shaka.media.SegmentIndex = class {
389
389
  * returned by the callback is null.
390
390
  *
391
391
  * @param {number} interval The interval in seconds.
392
- * @param {function():Array.<shaka.media.SegmentReference>} updateCallback
392
+ * @param {function(): Array<shaka.media.SegmentReference>} updateCallback
393
393
  * @export
394
394
  */
395
395
  updateEvery(interval, updateCallback) {
@@ -435,12 +435,12 @@ shaka.media.SegmentIndex = class {
435
435
  * Playlist will contain at least one independent frame."
436
436
  *
437
437
  * @param {number} time
438
- * @param {boolean=} allowNonIndepedent
438
+ * @param {boolean=} allowNonIndependent
439
439
  * @param {boolean=} reverse
440
440
  * @return {?shaka.media.SegmentIterator}
441
441
  * @export
442
442
  */
443
- getIteratorForTime(time, allowNonIndepedent = false, reverse = false) {
443
+ getIteratorForTime(time, allowNonIndependent = false, reverse = false) {
444
444
  let index = this.find(time);
445
445
  if (index == null) {
446
446
  return null;
@@ -463,7 +463,7 @@ shaka.media.SegmentIndex = class {
463
463
  let r = ref.partialReferences[i];
464
464
  // Note that a segment ends immediately before the end time.
465
465
  if ((time >= r.startTime) && (time < r.endTime)) {
466
- if (!allowNonIndepedent) {
466
+ if (!allowNonIndependent) {
467
467
  // Find an independent partial segment by moving backwards.
468
468
  while (i && (!r.isIndependent())) {
469
469
  i--;
@@ -503,7 +503,7 @@ shaka.media.SegmentIndex = class {
503
503
  *
504
504
  * @param {number} startTime
505
505
  * @param {number} duration
506
- * @param {!Array.<string>} uris
506
+ * @param {!Array<string>} uris
507
507
  * @return {!shaka.media.SegmentIndex}
508
508
  * @export
509
509
  */
@@ -527,7 +527,7 @@ if (goog.DEBUG) {
527
527
  /**
528
528
  * Asserts that the given SegmentReferences are sorted.
529
529
  *
530
- * @param {!Array.<shaka.media.SegmentReference>} references
530
+ * @param {!Array<shaka.media.SegmentReference>} references
531
531
  * @private
532
532
  */
533
533
  shaka.media.SegmentIndex.assertCorrectReferences_ = (references) => {
@@ -555,7 +555,7 @@ if (goog.DEBUG) {
555
555
  /**
556
556
  * An iterator over a SegmentIndex's references.
557
557
  *
558
- * @implements {Iterator.<shaka.media.SegmentReference>}
558
+ * @implements {Iterator<shaka.media.SegmentReference>}
559
559
  * @export
560
560
  */
561
561
  shaka.media.SegmentIterator = class {
@@ -708,7 +708,7 @@ shaka.media.SegmentIterator = class {
708
708
  *
709
709
  * @extends shaka.media.SegmentIndex
710
710
  * @implements {shaka.util.IReleasable}
711
- * @implements {Iterable.<!shaka.media.SegmentReference>}
711
+ * @implements {Iterable<!shaka.media.SegmentReference>}
712
712
  * @export
713
713
  */
714
714
  shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
@@ -716,7 +716,7 @@ shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
716
716
  constructor() {
717
717
  super([]);
718
718
 
719
- /** @private {!Array.<!shaka.media.SegmentIndex>} */
719
+ /** @private {!Array<!shaka.media.SegmentIndex>} */
720
720
  this.indexes_ = [];
721
721
  }
722
722
 
@@ -40,15 +40,15 @@ shaka.media.SegmentPrefetch = class {
40
40
  this.fetchDispatcher_ = fetchDispatcher;
41
41
 
42
42
  /**
43
- * @private {!Map.<
44
- * !(shaka.media.SegmentReference),
43
+ * @private {!Map<
44
+ * !shaka.media.SegmentReference,
45
45
  * !shaka.media.SegmentPrefetchOperation>}
46
46
  */
47
47
  this.segmentPrefetchMap_ = new Map();
48
48
 
49
49
  /**
50
- * @private {!Map.<
51
- * !(shaka.media.InitSegmentReference),
50
+ * @private {!Map<
51
+ * !shaka.media.InitSegmentReference,
52
52
  * !shaka.media.SegmentPrefetchOperation>}
53
53
  */
54
54
  this.initSegmentPrefetchMap_ = new Map();
@@ -89,7 +89,7 @@ shaka.media.SegmentPrefetch = class {
89
89
  }
90
90
  if (!this.iterator_) {
91
91
  this.iterator_ = this.stream_.segmentIndex.getIteratorForTime(
92
- currTime, /* allowNonIndepedent= */ true, this.reverse_);
92
+ currTime, /* allowNonIndependent= */ true, this.reverse_);
93
93
  }
94
94
  if (!this.iterator_) {
95
95
  shaka.log.debug(logPrefix, 'missing iterator');
@@ -104,7 +104,7 @@ shaka.media.SegmentPrefetch = class {
104
104
  if (!reference) {
105
105
  break;
106
106
  }
107
- // By default doesn't prefech preload partial segments when using
107
+ // By default doesn't prefetch preload partial segments when using
108
108
  // byterange
109
109
  let prefetchAllowed = true;
110
110
  if (reference.isPreload() && reference.endByte != null) {
@@ -173,8 +173,8 @@ shaka.media.SegmentPrefetch = class {
173
173
 
174
174
  /**
175
175
  * Get the result of prefetched segment if already exists.
176
- * @param {!(shaka.media.SegmentReference|shaka.media.InitSegmentReference)}
177
- * reference
176
+ * @param {!(shaka.media.SegmentReference|
177
+ * shaka.media.InitSegmentReference)} reference
178
178
  * @param {?function(BufferSource):!Promise=} streamDataCallback
179
179
  * @return {?shaka.net.NetworkingEngine.PendingRequest} op
180
180
  * @public
@@ -225,6 +225,9 @@ shaka.media.SegmentPrefetch = class {
225
225
 
226
226
  /**
227
227
  * Clear All Helper
228
+ * @param {!Map<T,
229
+ * !shaka.media.SegmentPrefetchOperation>} map
230
+ * @template T SegmentReference or InitSegmentReference
228
231
  * @private
229
232
  */
230
233
  clearMap_(map) {
@@ -355,8 +358,8 @@ shaka.media.SegmentPrefetch = class {
355
358
 
356
359
  /**
357
360
  * Remove a segment from prefetch map and abort it.
358
- * @param {!(shaka.media.SegmentReference|shaka.media.InitSegmentReference)}
359
- * reference
361
+ * @param {!(shaka.media.SegmentReference|
362
+ * shaka.media.InitSegmentReference)} reference
360
363
  * @private
361
364
  */
362
365
  abortPrefetchedSegment_(reference) {
@@ -384,6 +387,7 @@ shaka.media.SegmentPrefetch = class {
384
387
 
385
388
  /**
386
389
  * The prefix of the logs that are created in this class.
390
+ * @param {shaka.extern.Stream} stream
387
391
  * @return {string}
388
392
  * @private
389
393
  */
@@ -419,10 +423,10 @@ shaka.media.SegmentPrefetchOperation = class {
419
423
  }
420
424
 
421
425
  /**
422
- * Fetch a segments
426
+ * Fetch segments
423
427
  *
424
- * @param {!(shaka.media.SegmentReference|shaka.media.InitSegmentReference)}
425
- * reference
428
+ * @param {!(shaka.media.SegmentReference|
429
+ * shaka.media.InitSegmentReference)} reference
426
430
  * @param {!shaka.extern.Stream} stream
427
431
  * @return {!Promise}
428
432
  * @public
@@ -21,7 +21,7 @@ goog.require('shaka.util.BufferUtils');
21
21
  */
22
22
  shaka.media.InitSegmentReference = class {
23
23
  /**
24
- * @param {function():!Array.<string>} uris A function that creates the URIs
24
+ * @param {function(): !Array<string>} uris A function that creates the URIs
25
25
  * of the resource containing the segment.
26
26
  * @param {number} startByte The offset from the start of the resource to the
27
27
  * start of the segment.
@@ -37,7 +37,7 @@ shaka.media.InitSegmentReference = class {
37
37
  */
38
38
  constructor(uris, startByte, endByte, mediaQuality = null, timescale = null,
39
39
  segmentData = null, aesKey = null) {
40
- /** @type {function():!Array.<string>} */
40
+ /** @type {function(): !Array<string>} */
41
41
  this.getUris = uris;
42
42
 
43
43
  /** @const {number} */
@@ -158,7 +158,7 @@ shaka.media.SegmentReference = class {
158
158
  * @param {number} endTime The segment's end time in seconds. The segment
159
159
  * ends the instant before this time, so |endTime| must be strictly greater
160
160
  * than |startTime|.
161
- * @param {function():!Array.<string>} uris
161
+ * @param {function(): !Array<string>} uris
162
162
  * A function that creates the URIs of the resource containing the segment.
163
163
  * @param {number} startByte The offset from the start of the resource to the
164
164
  * start of the segment.
@@ -189,7 +189,7 @@ shaka.media.SegmentReference = class {
189
189
  * The end of the append window for this reference, relative to the
190
190
  * presentation. Any content from after this time will be removed by
191
191
  * MediaSource.
192
- * @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
192
+ * @param {!Array<!shaka.media.SegmentReference>=} partialReferences
193
193
  * A list of SegmentReferences for the partial segments.
194
194
  * @param {?string=} tilesLayout
195
195
  * The value is a grid-item-dimension consisting of two positive decimal
@@ -237,7 +237,7 @@ shaka.media.SegmentReference = class {
237
237
  */
238
238
  this.trueEndTime = endTime;
239
239
 
240
- /** @type {function():!Array.<string>} */
240
+ /** @type {function(): !Array<string>} */
241
241
  this.getUrisInner = uris;
242
242
 
243
243
  /** @const {number} */
@@ -258,7 +258,7 @@ shaka.media.SegmentReference = class {
258
258
  /** @type {number} */
259
259
  this.appendWindowEnd = appendWindowEnd;
260
260
 
261
- /** @type {!Array.<!shaka.media.SegmentReference>} */
261
+ /** @type {!Array<!shaka.media.SegmentReference>} */
262
262
  this.partialReferences = partialReferences;
263
263
 
264
264
  /** @type {?string} */
@@ -331,7 +331,7 @@ shaka.media.SegmentReference = class {
331
331
  /**
332
332
  * Creates and returns the URIs of the resource containing the segment.
333
333
  *
334
- * @return {!Array.<string>}
334
+ * @return {!Array<string>}
335
335
  * @export
336
336
  */
337
337
  getUris() {
@@ -463,8 +463,8 @@ shaka.media.SegmentUtils = class {
463
463
  }
464
464
 
465
465
  /**
466
- * @param {!Array.<string>} codecs
467
- * @return {!Array.<string>} codecs
466
+ * @param {!Array<string>} codecs
467
+ * @return {!Array<string>} codecs
468
468
  */
469
469
  static codecsFiltering(codecs) {
470
470
  const ContentType = shaka.util.ManifestParserUtils.ContentType;
@@ -487,8 +487,8 @@ shaka.media.SegmentUtils = class {
487
487
  }
488
488
 
489
489
  /**
490
- * @param {!Array.<string>} codecs
491
- * @return {!Array.<string>} codecs
490
+ * @param {!Array<string>} codecs
491
+ * @return {!Array<string>} codecs
492
492
  * @private
493
493
  */
494
494
  static filterDuplicateCodecs_(codecs) {
@@ -511,8 +511,8 @@ shaka.media.SegmentUtils = class {
511
511
  * Prioritizes Dolby Vision if supported. This is necessary because with
512
512
  * Dolby Vision we could have hvcC and dvcC boxes at the same time.
513
513
  *
514
- * @param {!Array.<string>} codecs
515
- * @return {!Array.<string>} codecs
514
+ * @param {!Array<string>} codecs
515
+ * @return {!Array<string>} codecs
516
516
  * @private
517
517
  */
518
518
  static chooseBetterCodecs_(codecs) {
@@ -570,7 +570,7 @@ shaka.media.SegmentUtils = class {
570
570
  * @param {!BufferSource} rawResult
571
571
  * @param {shaka.extern.aesKey} aesKey
572
572
  * @param {number} position
573
- * @return {!Promise.<!BufferSource>}
573
+ * @return {!Promise<!BufferSource>}
574
574
  */
575
575
  static async aesDecrypt(rawResult, aesKey, position) {
576
576
  const key = aesKey;
@@ -619,7 +619,7 @@ shaka.media.SegmentUtils = class {
619
619
  * width: ?string,
620
620
  * channelCount: ?number,
621
621
  * sampleRate: ?number,
622
- * closedCaptions: Map.<string, string>,
622
+ * closedCaptions: Map<string, string>,
623
623
  * videoRange: ?string,
624
624
  * colorGamut: ?string,
625
625
  * frameRate: ?string
@@ -633,7 +633,7 @@ shaka.media.SegmentUtils = class {
633
633
  * @property {?string} width
634
634
  * @property {?number} channelCount
635
635
  * @property {?number} sampleRate
636
- * @property {Map.<string, string>} closedCaptions
636
+ * @property {Map<string, string>} closedCaptions
637
637
  * @property {?string} videoRange
638
638
  * @property {?string} colorGamut
639
639
  * @property {?string} frameRate
@@ -12,6 +12,7 @@ goog.provide('shaka.media.StreamingEngine');
12
12
 
13
13
  goog.require('goog.asserts');
14
14
  goog.require('shaka.log');
15
+ goog.require('shaka.media.Capabilities');
15
16
  goog.require('shaka.media.InitSegmentReference');
16
17
  goog.require('shaka.media.ManifestParser');
17
18
  goog.require('shaka.media.MediaSourceEngine');
@@ -33,6 +34,7 @@ goog.require('shaka.util.MimeUtils');
33
34
  goog.require('shaka.util.Mp4BoxParsers');
34
35
  goog.require('shaka.util.Mp4Parser');
35
36
  goog.require('shaka.util.Networking');
37
+ goog.require('shaka.util.Timer');
36
38
 
37
39
 
38
40
  /**
@@ -76,7 +78,7 @@ shaka.media.StreamingEngine = class {
76
78
  /**
77
79
  * Retains a reference to the function used to close SegmentIndex objects
78
80
  * for streams which were switched away from during an ongoing update_().
79
- * @private {!Map.<string, !function()>}
81
+ * @private {!Map<string, !function()>}
80
82
  */
81
83
  this.deferredCloseSegmentIndex_ = new Map();
82
84
 
@@ -95,7 +97,7 @@ shaka.media.StreamingEngine = class {
95
97
  /**
96
98
  * Maps a content type, e.g., 'audio', 'video', or 'text', to a MediaState.
97
99
  *
98
- * @private {!Map.<shaka.util.ManifestParserUtils.ContentType,
100
+ * @private {!Map<shaka.util.ManifestParserUtils.ContentType,
99
101
  * !shaka.media.StreamingEngine.MediaState_>}
100
102
  */
101
103
  this.mediaStates_ = new Map();
@@ -147,6 +149,30 @@ shaka.media.StreamingEngine = class {
147
149
 
148
150
  /** @private {?shaka.media.StreamingEngine.MediaState_} */
149
151
  this.lastTextMediaStateBeforeUnload_ = null;
152
+
153
+ /** @private {?shaka.util.Timer} */
154
+ this.updateLiveSeekableRangeTime_ = new shaka.util.Timer(() => {
155
+ if (!this.manifest_ || !this.playerInterface_) {
156
+ return;
157
+ }
158
+ if (!this.manifest_.presentationTimeline.isLive()) {
159
+ this.playerInterface_.mediaSourceEngine.clearLiveSeekableRange();
160
+ if (this.updateLiveSeekableRangeTime_) {
161
+ this.updateLiveSeekableRangeTime_.stop();
162
+ }
163
+ return;
164
+ }
165
+ const startTime = this.manifest_.presentationTimeline.getSeekRangeStart();
166
+ const endTime = this.manifest_.presentationTimeline.getSeekRangeEnd();
167
+ // Some older devices require the range to be greater than 1 or exceptions
168
+ // are thrown, due to an old and buggy implementation.
169
+ if (endTime - startTime > 1) {
170
+ this.playerInterface_.mediaSourceEngine.setLiveSeekableRange(
171
+ startTime, endTime);
172
+ } else {
173
+ this.playerInterface_.mediaSourceEngine.clearLiveSeekableRange();
174
+ }
175
+ });
150
176
  }
151
177
 
152
178
  /** @override */
@@ -181,6 +207,10 @@ shaka.media.StreamingEngine = class {
181
207
  this.playerInterface_ = null;
182
208
  this.manifest_ = null;
183
209
  this.config_ = null;
210
+ if (this.updateLiveSeekableRangeTime_) {
211
+ this.updateLiveSeekableRangeTime_.stop();
212
+ }
213
+ this.updateLiveSeekableRangeTime_ = null;
184
214
  }
185
215
 
186
216
  /**
@@ -291,7 +321,7 @@ shaka.media.StreamingEngine = class {
291
321
  * chosen by a prior call to switchTextStream(). Once the Promise resolves,
292
322
  * switch*() may be called freely.
293
323
  *
294
- * @param {!Map.<number, shaka.media.SegmentPrefetch>=} segmentPrefetchById
324
+ * @param {!Map<number, shaka.media.SegmentPrefetch>=} segmentPrefetchById
295
325
  * If provided, segments prefetched for these streams will be used as needed
296
326
  * during playback.
297
327
  * @return {!Promise}
@@ -779,9 +809,7 @@ shaka.media.StreamingEngine = class {
779
809
  // If the new segment can be finished in time without risking a buffer
780
810
  // underflow, we should abort the old one and switch.
781
811
  const bufferedAhead = (bufferEnd || 0) - presentationTime;
782
- const safetyBuffer = Math.max(
783
- this.manifest_.minBufferTime || 0,
784
- this.config_.rebufferingGoal);
812
+ const safetyBuffer = this.config_.rebufferingGoal;
785
813
  const safeBufferedAhead = bufferedAhead - safetyBuffer;
786
814
  if (timeToFetchNewSegment < safeBufferedAhead) {
787
815
  return true;
@@ -933,7 +961,7 @@ shaka.media.StreamingEngine = class {
933
961
  * Initializes the initial streams and media states. This will schedule
934
962
  * updates for the given types.
935
963
  *
936
- * @param {!Map.<number, shaka.media.SegmentPrefetch>} segmentPrefetchById
964
+ * @param {!Map<number, shaka.media.SegmentPrefetch>} segmentPrefetchById
937
965
  * @return {!Promise}
938
966
  * @private
939
967
  */
@@ -952,11 +980,11 @@ shaka.media.StreamingEngine = class {
952
980
  }
953
981
 
954
982
  /**
955
- * @type {!Map.<shaka.util.ManifestParserUtils.ContentType,
983
+ * @type {!Map<shaka.util.ManifestParserUtils.ContentType,
956
984
  * shaka.extern.Stream>}
957
985
  */
958
986
  const streamsByType = new Map();
959
- /** @type {!Set.<shaka.extern.Stream>} */
987
+ /** @type {!Set<shaka.extern.Stream>} */
960
988
  const streams = new Set();
961
989
 
962
990
  if (this.currentVariant_.audio) {
@@ -1166,17 +1194,30 @@ shaka.media.StreamingEngine = class {
1166
1194
  * Sets the MediaSource's duration.
1167
1195
  */
1168
1196
  updateDuration() {
1197
+ const isInfiniteLiveStreamDurationSupported =
1198
+ shaka.media.Capabilities.isInfiniteLiveStreamDurationSupported();
1169
1199
  const duration = this.manifest_.presentationTimeline.getDuration();
1170
1200
  if (duration < Infinity) {
1201
+ if (isInfiniteLiveStreamDurationSupported) {
1202
+ if (this.updateLiveSeekableRangeTime_) {
1203
+ this.updateLiveSeekableRangeTime_.stop();
1204
+ }
1205
+ this.playerInterface_.mediaSourceEngine.clearLiveSeekableRange();
1206
+ }
1171
1207
  this.playerInterface_.mediaSourceEngine.setDuration(duration);
1172
1208
  } else {
1173
- // To set the media source live duration as Infinity
1174
- // If infiniteLiveStreamDuration as true
1175
- const duration =
1176
- this.config_.infiniteLiveStreamDuration ? Infinity : Math.pow(2, 32);
1177
- // Not all platforms support infinite durations, so set a finite duration
1178
- // so we can append segments and so the user agent can seek.
1179
- this.playerInterface_.mediaSourceEngine.setDuration(duration);
1209
+ // Set the media source live duration as Infinity if the platform supports
1210
+ // it.
1211
+ if (isInfiniteLiveStreamDurationSupported) {
1212
+ if (this.updateLiveSeekableRangeTime_) {
1213
+ this.updateLiveSeekableRangeTime_.tickEvery(/* seconds= */ 0.5);
1214
+ }
1215
+ this.playerInterface_.mediaSourceEngine.setDuration(Infinity);
1216
+ } else {
1217
+ // Not all platforms support infinite durations, so set a finite
1218
+ // duration so we can append segments and so the user agent can seek.
1219
+ this.playerInterface_.mediaSourceEngine.setDuration(Math.pow(2, 32));
1220
+ }
1180
1221
  }
1181
1222
  }
1182
1223
 
@@ -1246,7 +1287,7 @@ shaka.media.StreamingEngine = class {
1246
1287
  // Releases the segmentIndex of the old stream.
1247
1288
  if (thisStream.closeSegmentIndex) {
1248
1289
  goog.asserts.assert(!mediaState.stream.segmentIndex,
1249
- 'mediastate.stream should not have segmentIndex yet.');
1290
+ 'mediaState.stream should not have segmentIndex yet.');
1250
1291
  thisStream.closeSegmentIndex();
1251
1292
  }
1252
1293
  if (!mediaState.performingUpdate && !mediaState.updateTimer) {
@@ -1311,7 +1352,7 @@ shaka.media.StreamingEngine = class {
1311
1352
 
1312
1353
  const ContentType = shaka.util.ManifestParserUtils.ContentType;
1313
1354
 
1314
- // Do not schedule update for closed captions text mediastate, since closed
1355
+ // Do not schedule update for closed captions text mediaState, since closed
1315
1356
  // captions are embedded in video streams.
1316
1357
  if (shaka.media.StreamingEngine.isEmbeddedText_(mediaState)) {
1317
1358
  this.playerInterface_.mediaSourceEngine.setSelectedClosedCaptionId(
@@ -1366,9 +1407,7 @@ shaka.media.StreamingEngine = class {
1366
1407
  'bufferedAhead=' + bufferedAhead);
1367
1408
 
1368
1409
  const unscaledBufferingGoal = Math.max(
1369
- this.manifest_.minBufferTime || 0,
1370
- this.config_.rebufferingGoal,
1371
- this.config_.bufferingGoal);
1410
+ this.config_.rebufferingGoal, this.config_.bufferingGoal);
1372
1411
 
1373
1412
  const scaledBufferingGoal = Math.max(1,
1374
1413
  unscaledBufferingGoal * this.bufferingScale_);
@@ -1536,7 +1575,7 @@ shaka.media.StreamingEngine = class {
1536
1575
  if (mediaState.stream.segmentIndex) {
1537
1576
  mediaState.segmentIterator =
1538
1577
  mediaState.stream.segmentIndex.getIteratorForTime(
1539
- time, /* allowNonIndepedent= */ false, reverse);
1578
+ time, /* allowNonIndependent= */ false, reverse);
1540
1579
  }
1541
1580
  const ref = mediaState.segmentIterator &&
1542
1581
  mediaState.segmentIterator.next().value;
@@ -1564,7 +1603,7 @@ shaka.media.StreamingEngine = class {
1564
1603
  if (mediaState.stream.segmentIndex) {
1565
1604
  mediaState.segmentIterator =
1566
1605
  mediaState.stream.segmentIndex.getIteratorForTime(
1567
- lookupTime, /* allowNonIndepedent= */ false, reverse);
1606
+ lookupTime, /* allowNonIndependent= */ false, reverse);
1568
1607
  }
1569
1608
  ref = mediaState.segmentIterator &&
1570
1609
  mediaState.segmentIterator.next().value;
@@ -1575,7 +1614,7 @@ shaka.media.StreamingEngine = class {
1575
1614
  if (mediaState.stream.segmentIndex) {
1576
1615
  mediaState.segmentIterator =
1577
1616
  mediaState.stream.segmentIndex.getIteratorForTime(
1578
- presentationTime, /* allowNonIndepedent= */ false, reverse);
1617
+ presentationTime, /* allowNonIndependent= */ false, reverse);
1579
1618
  }
1580
1619
  ref = mediaState.segmentIterator &&
1581
1620
  mediaState.segmentIterator.next().value;
@@ -1976,7 +2015,7 @@ shaka.media.StreamingEngine = class {
1976
2015
  const logPrefix = StreamingEngine.logPrefix_(mediaState);
1977
2016
  const nullLastReferences = mediaState.lastSegmentReference == null;
1978
2017
 
1979
- /** @type {!Array.<!Promise>} */
2018
+ /** @type {!Array<!Promise>} */
1980
2019
  const operations = [];
1981
2020
 
1982
2021
  // Rounding issues can cause us to remove the first frame of a Period, so
@@ -2148,7 +2187,7 @@ shaka.media.StreamingEngine = class {
2148
2187
  const bufferEnd =
2149
2188
  this.playerInterface_.mediaSourceEngine.bufferEnd(mediaState.type);
2150
2189
  if (bufferEnd != null) {
2151
- // Adjust init segment appendance time if we have something in
2190
+ // Adjust init segment append time if we have something in
2152
2191
  // a buffer, i.e. due to running switchVariant() with non zero
2153
2192
  // safe margin value.
2154
2193
  initSegmentTime = bufferEnd;
@@ -2190,7 +2229,7 @@ shaka.media.StreamingEngine = class {
2190
2229
  const ContentType = shaka.util.ManifestParserUtils.ContentType;
2191
2230
 
2192
2231
  /**
2193
- * @type {!Map.<shaka.util.ManifestParserUtils.ContentType,
2232
+ * @type {!Map<shaka.util.ManifestParserUtils.ContentType,
2194
2233
  * shaka.extern.Stream>}
2195
2234
  */
2196
2235
  const streamsByType = new Map();
@@ -2425,11 +2464,11 @@ shaka.media.StreamingEngine = class {
2425
2464
  * Fetches the given segment.
2426
2465
  *
2427
2466
  * @param {!shaka.media.StreamingEngine.MediaState_} mediaState
2428
- * @param {(!shaka.media.InitSegmentReference|!shaka.media.SegmentReference)}
2429
- * reference
2467
+ * @param {(!shaka.media.InitSegmentReference|
2468
+ * !shaka.media.SegmentReference)} reference
2430
2469
  * @param {?function(BufferSource):!Promise=} streamDataCallback
2431
2470
  *
2432
- * @return {!Promise.<BufferSource>}
2471
+ * @return {!Promise<BufferSource>}
2433
2472
  * @private
2434
2473
  */
2435
2474
  async fetch_(mediaState, reference, streamDataCallback) {
@@ -2466,9 +2505,9 @@ shaka.media.StreamingEngine = class {
2466
2505
  /**
2467
2506
  * Fetches the given segment.
2468
2507
  *
2508
+ * @param {(!shaka.media.InitSegmentReference|
2509
+ * !shaka.media.SegmentReference)} reference
2469
2510
  * @param {!shaka.extern.Stream} stream
2470
- * @param {(!shaka.media.InitSegmentReference|!shaka.media.SegmentReference)}
2471
- * reference
2472
2511
  * @param {?function(BufferSource):!Promise=} streamDataCallback
2473
2512
  * @param {boolean=} isPreload
2474
2513
  *
@@ -2486,9 +2525,9 @@ shaka.media.StreamingEngine = class {
2486
2525
  /**
2487
2526
  * Fetches the given segment.
2488
2527
  *
2528
+ * @param {(!shaka.media.InitSegmentReference|
2529
+ * !shaka.media.SegmentReference)} reference
2489
2530
  * @param {!shaka.extern.Stream} stream
2490
- * @param {(!shaka.media.InitSegmentReference|!shaka.media.SegmentReference)}
2491
- * reference
2492
2531
  * @param {?function(BufferSource):!Promise} streamDataCallback
2493
2532
  * @param {shaka.extern.RetryParameters} retryParameters
2494
2533
  * @param {!shaka.net.NetworkingEngine} netEngine
@@ -2717,7 +2756,7 @@ shaka.media.StreamingEngine = class {
2717
2756
  * Reset Media Source
2718
2757
  *
2719
2758
  * @param {boolean=} force
2720
- * @return {!Promise.<boolean>}
2759
+ * @return {!Promise<boolean>}
2721
2760
  */
2722
2761
  async resetMediaSource(force = false, clearBuffer = true) {
2723
2762
  const now = (Date.now() / 1000);
@@ -2757,7 +2796,7 @@ shaka.media.StreamingEngine = class {
2757
2796
  }
2758
2797
  }
2759
2798
  /**
2760
- * @type {!Map.<shaka.util.ManifestParserUtils.ContentType,
2799
+ * @type {!Map<shaka.util.ManifestParserUtils.ContentType,
2761
2800
  * shaka.extern.Stream>}
2762
2801
  */
2763
2802
  const streamsByType = new Map();
@@ -2873,8 +2912,8 @@ shaka.media.StreamingEngine = class {
2873
2912
  * @property {function(!shaka.media.SegmentReference,
2874
2913
  * !shaka.extern.Stream)} onSegmentAppended
2875
2914
  * Called after a segment is successfully appended to a MediaSource.
2876
- * @property
2877
- * {function(!number, !shaka.media.InitSegmentReference)} onInitSegmentAppended
2915
+ * @property {function(!number,
2916
+ * !shaka.media.InitSegmentReference)} onInitSegmentAppended
2878
2917
  * Called when an init segment is appended to a MediaSource.
2879
2918
  * @property {!function(shaka.util.ManifestParserUtils.ContentType,
2880
2919
  * !BufferSource):Promise} beforeAppendSegment
@@ -151,7 +151,7 @@ shaka.media.TimeRangesUtils = class {
151
151
 
152
152
  /**
153
153
  * @param {TimeRanges} b
154
- * @return {!Array.<shaka.extern.BufferedRange>}
154
+ * @return {!Array<shaka.extern.BufferedRange>}
155
155
  */
156
156
  static getBufferedInfo(b) {
157
157
  if (!b) {
@@ -28,7 +28,7 @@ shaka.media.VideoWrapper = class {
28
28
  * @param {!HTMLMediaElement} video
29
29
  * @param {function()} onSeek Called when the video seeks.
30
30
  * @param {function(number)} onStarted Called when the video has started.
31
- * @param {function():number} getStartTime Calle to get the time to start at.
31
+ * @param {function():number} getStartTime Called to get the time to start at.
32
32
  */
33
33
  constructor(video, onSeek, onStarted, getStartTime) {
34
34
  /** @private {HTMLMediaElement} */
@@ -20,13 +20,13 @@ shaka.media.WebmSegmentIndexParser = class {
20
20
  * Parses SegmentReferences from a WebM container.
21
21
  * @param {BufferSource} cuesData The WebM container's "Cueing Data" section.
22
22
  * @param {BufferSource} initData The WebM container's headers.
23
- * @param {!Array.<string>} uris The possible locations of the WebM file that
23
+ * @param {!Array<string>} uris The possible locations of the WebM file that
24
24
  * contains the segments.
25
25
  * @param {shaka.media.InitSegmentReference} initSegmentReference
26
26
  * @param {number} timestampOffset
27
27
  * @param {number} appendWindowStart
28
28
  * @param {number} appendWindowEnd
29
- * @return {!Array.<!shaka.media.SegmentReference>}
29
+ * @return {!Array<!shaka.media.SegmentReference>}
30
30
  * @see http://www.matroska.org/technical/specs/index.html
31
31
  * @see http://www.webmproject.org/docs/container/
32
32
  */
@@ -183,12 +183,12 @@ shaka.media.WebmSegmentIndexParser = class {
183
183
  * @param {number} segmentOffset
184
184
  * @param {number} timecodeScale
185
185
  * @param {number} duration
186
- * @param {!Array.<string>} uris
186
+ * @param {!Array<string>} uris
187
187
  * @param {shaka.media.InitSegmentReference} initSegmentReference
188
188
  * @param {number} timestampOffset
189
189
  * @param {number} appendWindowStart
190
190
  * @param {number} appendWindowEnd
191
- * @return {!Array.<!shaka.media.SegmentReference>}
191
+ * @return {!Array<!shaka.media.SegmentReference>}
192
192
  * @private
193
193
  */
194
194
  static parseCues_(cuesElement, segmentOffset, timecodeScale, duration,