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
@@ -13,11 +13,10 @@
13
13
  /**
14
14
  * @typedef {{
15
15
  * presentationTimeline: !shaka.media.PresentationTimeline,
16
- * variants: !Array.<shaka.extern.Variant>,
17
- * textStreams: !Array.<shaka.extern.Stream>,
18
- * imageStreams: !Array.<shaka.extern.Stream>,
19
- * offlineSessionIds: !Array.<string>,
20
- * minBufferTime: number,
16
+ * variants: !Array<shaka.extern.Variant>,
17
+ * textStreams: !Array<shaka.extern.Stream>,
18
+ * imageStreams: !Array<shaka.extern.Stream>,
19
+ * offlineSessionIds: !Array<string>,
21
20
  * sequenceMode: boolean,
22
21
  * ignoreManifestTimestampsInSegmentsMode: boolean,
23
22
  * type: string,
@@ -64,23 +63,18 @@
64
63
  * @property {!shaka.media.PresentationTimeline} presentationTimeline
65
64
  * <i>Required.</i> <br>
66
65
  * The presentation timeline.
67
- * @property {!Array.<shaka.extern.Variant>} variants
66
+ * @property {!Array<shaka.extern.Variant>} variants
68
67
  * <i>Required.</i> <br>
69
68
  * The presentation's Variants. There must be at least one Variant.
70
- * @property {!Array.<shaka.extern.Stream>} textStreams
69
+ * @property {!Array<shaka.extern.Stream>} textStreams
71
70
  * <i>Required.</i> <br>
72
71
  * The presentation's text streams.
73
- * @property {!Array.<shaka.extern.Stream>} imageStreams
72
+ * @property {!Array<shaka.extern.Stream>} imageStreams
74
73
  * <i>Required.</i> <br>
75
74
  * The presentation's image streams
76
- * @property {!Array.<string>} offlineSessionIds
75
+ * @property {!Array<string>} offlineSessionIds
77
76
  * <i>Defaults to [].</i> <br>
78
77
  * An array of EME sessions to load for offline playback.
79
- * @property {number} minBufferTime
80
- * <i>Defaults to 0.</i> <br>
81
- * The minimum number of seconds of content that must be buffered before
82
- * playback can begin. Can be overridden by a higher value from the Player
83
- * configuration.
84
78
  * @property {boolean} sequenceMode
85
79
  * If true, we will append the media segments using sequence mode; that is to
86
80
  * say, ignoring any timestamps inside the media files.
@@ -110,7 +104,7 @@
110
104
  * discontinuities found between periods. For HLS, it is a number of EXT-X-GAP
111
105
  * and GAP=YES occurrences. For MSS, it is always set to 0.
112
106
  * If in src= mode or nothing is loaded, NaN.
113
- * @property {bolean} isLowLatency
107
+ * @property {boolean} isLowLatency
114
108
  * If true, the manifest is Low Latency.
115
109
  * @property {?number} startTime
116
110
  * Indicate the startTime of the playback, when <code>startTime</code> is
@@ -124,29 +118,29 @@ shaka.extern.Manifest;
124
118
 
125
119
  /**
126
120
  * @typedef {{
127
- * id: string,
128
- * audioStreams: !Array.<shaka.extern.Stream>,
129
- * videoStreams: !Array.<shaka.extern.Stream>,
130
- * textStreams: !Array.<shaka.extern.Stream>,
131
- * imageStreams: !Array.<shaka.extern.Stream>
132
- * }}
133
- *
134
- * @description Contains the streams from one DASH period.
135
- * For use in {@link shaka.util.PeriodCombiner}.
136
- *
137
- * @property {string} id
138
- * The Period ID.
139
- * @property {!Array.<shaka.extern.Stream>} audioStreams
140
- * The audio streams from one Period.
141
- * @property {!Array.<shaka.extern.Stream>} videoStreams
142
- * The video streams from one Period.
143
- * @property {!Array.<shaka.extern.Stream>} textStreams
144
- * The text streams from one Period.
145
- * @property {!Array.<shaka.extern.Stream>} imageStreams
146
- * The image streams from one Period.
147
- *
148
- * @exportDoc
149
- */
121
+ * id: string,
122
+ * audioStreams: !Array<shaka.extern.Stream>,
123
+ * videoStreams: !Array<shaka.extern.Stream>,
124
+ * textStreams: !Array<shaka.extern.Stream>,
125
+ * imageStreams: !Array<shaka.extern.Stream>
126
+ * }}
127
+ *
128
+ * @description Contains the streams from one DASH period.
129
+ * For use in {@link shaka.util.PeriodCombiner}.
130
+ *
131
+ * @property {string} id
132
+ * The Period ID.
133
+ * @property {!Array<shaka.extern.Stream>} audioStreams
134
+ * The audio streams from one Period.
135
+ * @property {!Array<shaka.extern.Stream>} videoStreams
136
+ * The video streams from one Period.
137
+ * @property {!Array<shaka.extern.Stream>} textStreams
138
+ * The text streams from one Period.
139
+ * @property {!Array<shaka.extern.Stream>} imageStreams
140
+ * The image streams from one Period.
141
+ *
142
+ * @exportDoc
143
+ */
150
144
  shaka.extern.Period;
151
145
 
152
146
  /**
@@ -192,7 +186,7 @@ shaka.extern.ServiceDescription;
192
186
  * bandwidth: number,
193
187
  * allowedByApplication: boolean,
194
188
  * allowedByKeySystem: boolean,
195
- * decodingInfos: !Array.<MediaCapabilitiesDecodingInfo>
189
+ * decodingInfos: !Array<MediaCapabilitiesDecodingInfo>
196
190
  * }}
197
191
  *
198
192
  * @description
@@ -233,7 +227,7 @@ shaka.extern.ServiceDescription;
233
227
  * <i>Defaults to true.</i><br>
234
228
  * Set by the Player to indicate whether the variant is allowed to be played
235
229
  * by the key system.
236
- * @property {!Array.<MediaCapabilitiesDecodingInfo>} decodingInfos
230
+ * @property {!Array<MediaCapabilitiesDecodingInfo>} decodingInfos
237
231
  * <i>Defaults to [].</i><br>
238
232
  * Set by StreamUtils to indicate the results from MediaCapabilities
239
233
  * decodingInfo.
@@ -364,30 +358,30 @@ shaka.extern.SegmentIndex = class {
364
358
  * height: (number|undefined),
365
359
  * kind: (string|undefined),
366
360
  * encrypted: boolean,
367
- * drmInfos: !Array.<shaka.extern.DrmInfo>,
368
- * keyIds: !Set.<string>,
361
+ * drmInfos: !Array<shaka.extern.DrmInfo>,
362
+ * keyIds: !Set<string>,
369
363
  * language: string,
370
364
  * originalLanguage: ?string,
371
365
  * label: ?string,
372
366
  * type: string,
373
367
  * primary: boolean,
374
368
  * trickModeVideo: ?shaka.extern.Stream,
375
- * emsgSchemeIdUris: ?Array.<string>,
376
- * roles: !Array.<string>,
369
+ * emsgSchemeIdUris: ?Array<string>,
370
+ * roles: !Array<string>,
377
371
  * accessibilityPurpose: ?shaka.media.ManifestParser.AccessibilityPurpose,
378
372
  * forced: boolean,
379
373
  * channelsCount: ?number,
380
374
  * audioSamplingRate: ?number,
381
375
  * spatialAudio: boolean,
382
- * closedCaptions: Map.<string, string>,
376
+ * closedCaptions: Map<string, string>,
383
377
  * tilesLayout: (string|undefined),
384
378
  * matchedStreams:
385
- * (!Array.<shaka.extern.Stream>|!Array.<shaka.extern.StreamDB>|
379
+ * (!Array<shaka.extern.Stream>|!Array<shaka.extern.StreamDB>|
386
380
  * undefined),
387
381
  * mssPrivateData: (shaka.extern.MssPrivateData|undefined),
388
382
  * external: boolean,
389
383
  * fastSwitching: boolean,
390
- * fullMimeTypes: !Set.<string>,
384
+ * fullMimeTypes: !Set<string>,
391
385
  * isAudioMuxedInVideo: boolean
392
386
  * }}
393
387
  *
@@ -458,11 +452,12 @@ shaka.extern.SegmentIndex = class {
458
452
  * @property {boolean} encrypted
459
453
  * <i>Defaults to false.</i><br>
460
454
  * True if the stream is encrypted.
461
- * @property {!Array.<!shaka.extern.DrmInfo>} drmInfos
455
+ * Note: DRM encryption only, so AES encryption is not taken into account.
456
+ * @property {!Array<!shaka.extern.DrmInfo>} drmInfos
462
457
  * <i>Defaults to [] (i.e., no DRM).</i> <br>
463
458
  * An array of DrmInfo objects which describe DRM schemes are compatible with
464
459
  * the content.
465
- * @property {!Set.<string>} keyIds
460
+ * @property {!Set<string>} keyIds
466
461
  * <i>Defaults to empty (i.e., unencrypted or key ID unknown).</i> <br>
467
462
  * The stream's key IDs as lowercase hex strings. These key IDs identify the
468
463
  * encryption keys that the browser (key system) can use to decrypt the
@@ -487,15 +482,15 @@ shaka.extern.SegmentIndex = class {
487
482
  * @property {?shaka.extern.Stream} trickModeVideo
488
483
  * <i>Video streams only.</i> <br>
489
484
  * An alternate video stream to use for trick mode playback.
490
- * @property {?Array.<string>} emsgSchemeIdUris
485
+ * @property {?Array<string>} emsgSchemeIdUris
491
486
  * <i>Defaults to empty.</i><br>
492
487
  * Array of registered emsg box scheme_id_uri that should result in
493
488
  * Player events.
494
- * @property {!Array.<string>} roles
489
+ * @property {!Array<string>} roles
495
490
  * The roles of the stream as they appear on the manifest,
496
491
  * e.g. 'main', 'caption', or 'commentary'.
497
- * @property {?shaka.media.ManifestParser.AccessibilityPurpose}
498
- * accessibilityPurpose
492
+ * @property {?shaka.media.ManifestParser.AccessibilityPurpose
493
+ * } accessibilityPurpose
499
494
  * The DASH accessibility descriptor, if one was provided for this stream.
500
495
  * @property {boolean} forced
501
496
  * <i>Defaults to false.</i> <br>
@@ -507,7 +502,7 @@ shaka.extern.SegmentIndex = class {
507
502
  * @property {boolean} spatialAudio
508
503
  * <i>Defaults to false.</i> <br>
509
504
  * Whether the stream set has spatial audio
510
- * @property {Map.<string, string>} closedCaptions
505
+ * @property {Map<string, string>} closedCaptions
511
506
  * A map containing the description of closed captions, with the caption
512
507
  * channel number (CC1 | CC2 | CC3 | CC4) as the key and the language code
513
508
  * as the value. If the channel number is not provided by the description,
@@ -519,7 +514,7 @@ shaka.extern.SegmentIndex = class {
519
514
  * The value is a grid-item-dimension consisting of two positive decimal
520
515
  * integers in the format: column-x-row ('4x3'). It describes the arrangement
521
516
  * of Images in a Grid. The minimum valid LAYOUT is '1x1'.
522
- * @property {(!Array.<shaka.extern.Stream>|!Array.<shaka.extern.StreamDB>|
517
+ * @property {(!Array<shaka.extern.Stream>|!Array<shaka.extern.StreamDB>|
523
518
  * undefined)} matchedStreams
524
519
  * The streams in all periods which match the stream. Used for Dash.
525
520
  * @property {(shaka.extern.MssPrivateData|undefined)} mssPrivateData
@@ -530,7 +525,7 @@ shaka.extern.SegmentIndex = class {
530
525
  * Eg: external text tracks.
531
526
  * @property {boolean} fastSwitching
532
527
  * Indicate if the stream should be used for fast switching.
533
- * @property {!Set.<string>} fullMimeTypes
528
+ * @property {!Set<string>} fullMimeTypes
534
529
  * A set of full MIME types (e.g. MIME types plus codecs information), that
535
530
  * represents the types used in each period of the original manifest.
536
531
  * Meant for being used by compatibility checking, such as with
@@ -61,7 +61,7 @@ shaka.extern.ManifestParser = class {
61
61
  * @param {shaka.extern.ManifestParser.PlayerInterface} playerInterface
62
62
  * The player interface contains the callbacks and members that the parser
63
63
  * can use to communicate with the player and outside world.
64
- * @return {!Promise.<shaka.extern.Manifest>}
64
+ * @return {!Promise<shaka.extern.Manifest>}
65
65
  * @exportDoc
66
66
  */
67
67
  start(uri, playerInterface) {}
@@ -132,14 +132,12 @@ shaka.extern.ManifestParser = class {
132
132
  * onEvent: function(!Event),
133
133
  * onError: function(!shaka.util.Error),
134
134
  * isLowLatencyMode: function():boolean,
135
- * isAutoLowLatencyMode: function():boolean,
136
- * enableLowLatencyMode: function(),
137
135
  * updateDuration: function(),
138
136
  * newDrmInfo: function(shaka.extern.Stream),
139
137
  * onManifestUpdated: function(),
140
138
  * getBandwidthEstimate: function():number,
141
139
  * onMetadata: function(string, number, ?number,
142
- * !Array.<shaka.extern.MetadataFrame>),
140
+ * !Array<shaka.extern.MetadataFrame>),
143
141
  * disableStream: function(!shaka.extern.Stream),
144
142
  * addFont: function(string, string)
145
143
  * }}
@@ -167,10 +165,6 @@ shaka.extern.ManifestParser = class {
167
165
  * Should be called when an error occurs.
168
166
  * @property {function():boolean} isLowLatencyMode
169
167
  * Return true if low latency streaming mode is enabled.
170
- * @property {function():boolean} isAutoLowLatencyMode
171
- * Return true if auto low latency streaming mode is enabled.
172
- * @property {function()} enableLowLatencyMode
173
- * Enable low latency streaming mode.
174
168
  * @property {function()} updateDuration
175
169
  * Update the presentation duration based on PresentationTimeline.
176
170
  * @property {function(shaka.extern.Stream)} newDrmInfo
@@ -181,7 +175,7 @@ shaka.extern.ManifestParser = class {
181
175
  * @property {function():number} getBandwidthEstimate
182
176
  * Get the estimated bandwidth in bits per second.
183
177
  * @property {function(string, number, ?number,
184
- * !Array.<shaka.extern.MetadataFrame>)} onMetadata
178
+ * !Array<shaka.extern.MetadataFrame>)} onMetadata
185
179
  * Called when an metadata is found in the manifest.
186
180
  * @property {function(!shaka.extern.Stream)} disableStream
187
181
  * Called to temporarily disable a stream i.e. disabling all variant
@@ -53,10 +53,10 @@ shaka.extern.RetryParameters;
53
53
 
54
54
  /**
55
55
  * @typedef {{
56
- * uris: !Array.<string>,
56
+ * uris: !Array<string>,
57
57
  * method: string,
58
58
  * body: ?BufferSource,
59
- * headers: !Object.<string, string>,
59
+ * headers: !Object<string, string>,
60
60
  * allowCrossSiteCredentials: boolean,
61
61
  * retryParameters: !shaka.extern.RetryParameters,
62
62
  * licenseRequestType: ?string,
@@ -76,14 +76,14 @@ shaka.extern.RetryParameters;
76
76
  * that may alter the request, then it is passed to a scheme plugin which
77
77
  * performs the actual operation.
78
78
  *
79
- * @property {!Array.<string>} uris
79
+ * @property {!Array<string>} uris
80
80
  * An array of URIs to attempt. They will be tried in the order they are
81
81
  * given.
82
82
  * @property {string} method
83
83
  * The HTTP method to use for the request.
84
84
  * @property {?BufferSource} body
85
85
  * The body of the request.
86
- * @property {!Object.<string, string>} headers
86
+ * @property {!Object<string, string>} headers
87
87
  * A mapping of headers for the request. e.g.: {'HEADER': 'VALUE'}
88
88
  * @property {boolean} allowCrossSiteCredentials
89
89
  * Make requests with credentials. This will allow cookies in cross-site
@@ -128,9 +128,10 @@ shaka.extern.Request;
128
128
  * originalUri: string,
129
129
  * data: BufferSource,
130
130
  * status: (number|undefined),
131
- * headers: !Object.<string, string>,
131
+ * headers: !Object<string, string>,
132
132
  * timeMs: (number|undefined),
133
- * fromCache: (boolean|undefined)
133
+ * fromCache: (boolean|undefined),
134
+ * originalRequest: shaka.extern.Request
134
135
  * }}
135
136
  *
136
137
  * @description
@@ -148,7 +149,7 @@ shaka.extern.Request;
148
149
  * The body of the response.
149
150
  * @property {(number|undefined)} status
150
151
  * The response HTTP status code.
151
- * @property {!Object.<string, string>} headers
152
+ * @property {!Object<string, string>} headers
152
153
  * A map of response headers, if supported by the underlying protocol.
153
154
  * All keys should be lowercased.
154
155
  * For HTTP/HTTPS, may not be available cross-origin.
@@ -158,6 +159,8 @@ shaka.extern.Request;
158
159
  * @property {(boolean|undefined)} fromCache
159
160
  * Optional. If true, this response was from a cache and should be ignored
160
161
  * for bandwidth estimation.
162
+ * @property {shaka.extern.Request} originalRequest
163
+ * The original request that gave rise to this response.
161
164
  *
162
165
  * @exportDoc
163
166
  */
@@ -188,18 +191,18 @@ shaka.extern.SchemePlugin;
188
191
 
189
192
  /**
190
193
  * @typedef {{
191
- * minBytesForProgressEvents: (number|undefined)
192
- * }}
193
- *
194
- * @description
195
- * Defines configuration object to use by SchemePlugins.
196
- *
197
- * @property {(number|undefined)} minBytesForProgressEvents
198
- * Defines minimum number of bytes that should be use to emit progress event,
199
- * if possible.
200
- *
201
- * @exportDoc
202
- */
194
+ * minBytesForProgressEvents: (number|undefined)
195
+ * }}
196
+ *
197
+ * @description
198
+ * Defines configuration object to use by SchemePlugins.
199
+ *
200
+ * @property {(number|undefined)} minBytesForProgressEvents
201
+ * Defines minimum number of bytes that should be use to emit progress event,
202
+ * if possible.
203
+ *
204
+ * @exportDoc
205
+ */
203
206
  shaka.extern.SchemePluginConfig;
204
207
 
205
208
 
@@ -221,7 +224,7 @@ shaka.extern.ProgressUpdated;
221
224
 
222
225
 
223
226
  /**
224
- * @typedef {function(!Object.<string, string>)}
227
+ * @typedef {function(!Object<string, string>)}
225
228
  *
226
229
  * @description
227
230
  * A callback function to handle headers received events through networking
@@ -13,12 +13,12 @@
13
13
  /**
14
14
  * @typedef {{
15
15
  * basic: boolean,
16
- * encrypted: !Object.<string, boolean>
16
+ * encrypted: !Object<string, boolean>
17
17
  * }}
18
18
  *
19
19
  * @property {boolean} basic
20
20
  * True if offline is usable at all.
21
- * @property {!Object.<string, boolean>} encrypted
21
+ * @property {!Object<string, boolean>} encrypted
22
22
  * A map of key system name to whether it supports offline playback.
23
23
  * @exportDoc
24
24
  */
@@ -32,7 +32,7 @@ shaka.extern.OfflineSupport;
32
32
  * duration: number,
33
33
  * size: number,
34
34
  * expiration: number,
35
- * tracks: !Array.<shaka.extern.Track>,
35
+ * tracks: !Array<shaka.extern.Track>,
36
36
  * appMetadata: Object,
37
37
  * isIncomplete: boolean
38
38
  * }}
@@ -50,7 +50,7 @@ shaka.extern.OfflineSupport;
50
50
  * @property {number} expiration
51
51
  * The time that the encrypted license expires, in milliseconds. If the media
52
52
  * is clear or the license never expires, this will equal Infinity.
53
- * @property {!Array.<shaka.extern.Track>} tracks
53
+ * @property {!Array<shaka.extern.Track>} tracks
54
54
  * The tracks that are stored.
55
55
  * @property {Object} appMetadata
56
56
  * The metadata passed to store().
@@ -69,8 +69,8 @@ shaka.extern.StoredContent;
69
69
  * duration: number,
70
70
  * size: number,
71
71
  * expiration: number,
72
- * streams: !Array.<shaka.extern.StreamDB>,
73
- * sessionIds: !Array.<string>,
72
+ * streams: !Array<shaka.extern.StreamDB>,
73
+ * sessionIds: !Array<string>,
74
74
  * drmInfo: ?shaka.extern.DrmInfo,
75
75
  * appMetadata: Object,
76
76
  * isIncomplete: (boolean|undefined),
@@ -90,9 +90,9 @@ shaka.extern.StoredContent;
90
90
  * The license expiration, in milliseconds; or Infinity if not applicable.
91
91
  * Note that upon JSON serialization, Infinity becomes null, and must be
92
92
  * converted back upon loading from storage.
93
- * @property {!Array.<shaka.extern.StreamDB>} streams
93
+ * @property {!Array<shaka.extern.StreamDB>} streams
94
94
  * The Streams that are stored.
95
- * @property {!Array.<string>} sessionIds
95
+ * @property {!Array<string>} sessionIds
96
96
  * The DRM offline session IDs for the media.
97
97
  * @property {?shaka.extern.DrmInfo} drmInfo
98
98
  * The DRM info used to initialize EME.
@@ -131,15 +131,15 @@ shaka.extern.ManifestDB;
131
131
  * width: ?number,
132
132
  * height: ?number,
133
133
  * encrypted: boolean,
134
- * keyIds: !Set.<string>,
135
- * segments: !Array.<shaka.extern.SegmentDB>,
136
- * variantIds: !Array.<number>,
137
- * roles: !Array.<string>,
134
+ * keyIds: !Set<string>,
135
+ * segments: !Array<shaka.extern.SegmentDB>,
136
+ * variantIds: !Array<number>,
137
+ * roles: !Array<string>,
138
138
  * forced: boolean,
139
139
  * channelsCount: ?number,
140
140
  * audioSamplingRate: ?number,
141
141
  * spatialAudio: boolean,
142
- * closedCaptions: Map.<string, string>,
142
+ * closedCaptions: Map<string, string>,
143
143
  * tilesLayout: (string|undefined),
144
144
  * mssPrivateData: (shaka.extern.MssPrivateData|undefined),
145
145
  * external: boolean,
@@ -187,13 +187,13 @@ shaka.extern.ManifestDB;
187
187
  * The height of the stream; null for audio/text.
188
188
  * @property {boolean} encrypted
189
189
  * Whether this stream is encrypted.
190
- * @property {!Set.<string>} keyIds
190
+ * @property {!Set<string>} keyIds
191
191
  * The key IDs this stream is encrypted with.
192
- * @property {!Array.<shaka.extern.SegmentDB>} segments
192
+ * @property {!Array<shaka.extern.SegmentDB>} segments
193
193
  * An array of segments that make up the stream.
194
- * @property {!Array.<number>} variantIds
194
+ * @property {!Array<number>} variantIds
195
195
  * An array of ids of variants the stream is a part of.
196
- * @property {!Array.<string>} roles
196
+ * @property {!Array<string>} roles
197
197
  * The roles of the stream as they appear on the manifest,
198
198
  * e.g. 'main', 'caption', or 'commentary'.
199
199
  * @property {boolean} forced
@@ -204,7 +204,7 @@ shaka.extern.ManifestDB;
204
204
  * Specifies the maximum sampling rate of the content.
205
205
  * @property {boolean} spatialAudio
206
206
  * Whether the stream set has spatial audio.
207
- * @property {Map.<string, string>} closedCaptions
207
+ * @property {Map<string, string>} closedCaptions
208
208
  * A map containing the description of closed captions, with the caption
209
209
  * channel number (CC1 | CC2 | CC3 | CC4) as the key and the language code
210
210
  * as the value. If the channel number is not provided by the description,
@@ -303,8 +303,8 @@ shaka.extern.SegmentDataDB;
303
303
  * keySystem: string,
304
304
  * licenseUri: string,
305
305
  * serverCertificate: Uint8Array,
306
- * audioCapabilities: !Array.<MediaKeySystemMediaCapability>,
307
- * videoCapabilities: !Array.<MediaKeySystemMediaCapability>
306
+ * audioCapabilities: !Array<MediaKeySystemMediaCapability>,
307
+ * videoCapabilities: !Array<MediaKeySystemMediaCapability>
308
308
  * }}
309
309
  *
310
310
  * @property {string} sessionId
@@ -317,9 +317,9 @@ shaka.extern.SegmentDataDB;
317
317
  * A key-system-specific server certificate used to encrypt license requests.
318
318
  * Its use is optional and is meant as an optimization to avoid a round-trip
319
319
  * to request a certificate.
320
- * @property {!Array.<MediaKeySystemMediacapability>} audioCapabilities
320
+ * @property {!Array<MediaKeySystemMediaCapability>} audioCapabilities
321
321
  * The EME audio capabilities used to create the session.
322
- * @property {!Array.<MediaKeySystemMediacapability>} videoCapabilities
322
+ * @property {!Array<MediaKeySystemMediaCapability>} videoCapabilities
323
323
  * The EME video capabilities used to create the session.
324
324
  */
325
325
  shaka.extern.EmeSessionDB;
@@ -362,8 +362,8 @@ shaka.extern.StorageCell = class {
362
362
  * of keys for each segment. If one segment fails to be added, all segments
363
363
  * should fail to be added.
364
364
  *
365
- * @param {!Array.<shaka.extern.SegmentDataDB>} segments
366
- * @return {!Promise.<!Array.<number>>}
365
+ * @param {!Array<shaka.extern.SegmentDataDB>} segments
366
+ * @return {!Promise<!Array<number>>}
367
367
  */
368
368
  addSegments(segments) {}
369
369
 
@@ -371,7 +371,7 @@ shaka.extern.StorageCell = class {
371
371
  * Remove a group of segments using their keys to identify them. If a key
372
372
  * is not found, then that removal should be considered successful.
373
373
  *
374
- * @param {!Array.<number>} keys
374
+ * @param {!Array<number>} keys
375
375
  * @param {function(number)} onRemove A callback for when a segment is removed
376
376
  * from the cell. The key of the segment
377
377
  * will be passed to the callback.
@@ -383,8 +383,8 @@ shaka.extern.StorageCell = class {
383
383
  * Get a group of segments using their keys to identify them. If any key is
384
384
  * not found, the promise chain will be rejected.
385
385
  *
386
- * @param {!Array.<number>} keys
387
- * @return {!Promise.<!Array.<shaka.extern.SegmentDataDB>>}
386
+ * @param {!Array<number>} keys
387
+ * @return {!Promise<!Array<shaka.extern.SegmentDataDB>>}
388
388
  */
389
389
  getSegments(keys) {}
390
390
 
@@ -393,8 +393,8 @@ shaka.extern.StorageCell = class {
393
393
  * of keys for each manifest. If one manifest fails to be added, all manifests
394
394
  * should fail to be added.
395
395
  *
396
- * @param {!Array.<shaka.extern.ManifestDB>} manifests
397
- * @return {!Promise<!Array.<number>>} keys
396
+ * @param {!Array<shaka.extern.ManifestDB>} manifests
397
+ * @return {!Promise<!Array<number>>} keys
398
398
  */
399
399
  addManifests(manifests) {}
400
400
 
@@ -422,7 +422,7 @@ shaka.extern.StorageCell = class {
422
422
  * Remove a group of manifests using their keys to identify them. If a key
423
423
  * is not found, then that removal should be considered successful.
424
424
  *
425
- * @param {!Array.<number>} keys
425
+ * @param {!Array<number>} keys
426
426
  * @param {function(number)} onRemove A callback for when a manifest is
427
427
  * removed from the cell. The key of the
428
428
  * manifest will be passed to the callback.
@@ -434,8 +434,8 @@ shaka.extern.StorageCell = class {
434
434
  * Get a group of manifests using their keys to identify them. If any key is
435
435
  * not found, the promise chain will be rejected.
436
436
  *
437
- * @param {!Array.<number>} keys
438
- * @return {!Promise<!Array.<shaka.extern.ManifestDB>>}
437
+ * @param {!Array<number>} keys
438
+ * @return {!Promise<!Array<shaka.extern.ManifestDB>>}
439
439
  */
440
440
  getManifests(keys) {}
441
441
 
@@ -444,7 +444,7 @@ shaka.extern.StorageCell = class {
444
444
  * to the asset they describe, it is assumed that it is feasible to have them
445
445
  * all in main memory at one time.
446
446
  *
447
- * @return {!Promise<!Map.<number, shaka.extern.ManifestDB>>}
447
+ * @return {!Promise<!Map<number, shaka.extern.ManifestDB>>}
448
448
  */
449
449
  getAllManifests() {}
450
450
  };
@@ -468,20 +468,20 @@ shaka.extern.EmeSessionStorageCell = class {
468
468
 
469
469
  /**
470
470
  * Gets the currently stored sessions.
471
- * @return {!Promise.<!Array.<shaka.extern.EmeSessionDB>>}
471
+ * @return {!Promise<!Array<shaka.extern.EmeSessionDB>>}
472
472
  */
473
473
  getAll() {}
474
474
 
475
475
  /**
476
476
  * Adds the given sessions to the store.
477
- * @param {!Array.<shaka.extern.EmeSessionDB>} sessions
477
+ * @param {!Array<shaka.extern.EmeSessionDB>} sessions
478
478
  * @return {!Promise}
479
479
  */
480
480
  add(sessions) {}
481
481
 
482
482
  /**
483
483
  * Removes the given session IDs from the store.
484
- * @param {!Array.<string>} sessionIds
484
+ * @param {!Array<string>} sessionIds
485
485
  * @return {!Promise}
486
486
  */
487
487
  remove(sessionIds) {}
@@ -525,7 +525,7 @@ shaka.extern.StorageMechanism = class {
525
525
  * cell's address in the mechanism and should be consistent between calls to
526
526
  * |getCells|.
527
527
  *
528
- * @return {!Map.<string, !shaka.extern.StorageCell>}
528
+ * @return {!Map<string, !shaka.extern.StorageCell>}
529
529
  */
530
530
  getCells() {}
531
531
 
@@ -16,8 +16,8 @@
16
16
  * duration: number,
17
17
  * size: number,
18
18
  * expiration: number,
19
- * periods: !Array.<shaka.extern.PeriodDBV1>,
20
- * sessionIds: !Array.<string>,
19
+ * periods: !Array<shaka.extern.PeriodDBV1>,
20
+ * sessionIds: !Array<string>,
21
21
  * drmInfo: ?shaka.extern.DrmInfo,
22
22
  * appMetadata: Object
23
23
  * }}
@@ -34,9 +34,9 @@
34
34
  * The license expiration, in milliseconds; or Infinity if not applicable.
35
35
  * Note that upon JSON serialization, Infinity becomes null, and must be
36
36
  * converted back upon loading from storage.
37
- * @property {!Array.<shaka.extern.PeriodDBV1>} periods
37
+ * @property {!Array<shaka.extern.PeriodDBV1>} periods
38
38
  * The Periods that are stored.
39
- * @property {!Array.<string>} sessionIds
39
+ * @property {!Array<string>} sessionIds
40
40
  * The DRM offline session IDs for the media.
41
41
  * @property {?shaka.extern.DrmInfo} drmInfo
42
42
  * The DRM info used to initialize EME.
@@ -49,12 +49,12 @@ shaka.extern.ManifestDBV1;
49
49
  /**
50
50
  * @typedef {{
51
51
  * startTime: number,
52
- * streams: !Array.<shaka.extern.StreamDBV1>
52
+ * streams: !Array<shaka.extern.StreamDBV1>
53
53
  * }}
54
54
  *
55
55
  * @property {number} startTime
56
56
  * The start time of the period, in seconds.
57
- * @property {!Array.<shaka.extern.StreamDBV1>} streams
57
+ * @property {!Array<shaka.extern.StreamDBV1>} streams
58
58
  * The streams that define the Period.
59
59
  */
60
60
  shaka.extern.PeriodDBV1;
@@ -77,8 +77,8 @@ shaka.extern.PeriodDBV1;
77
77
  * initSegmentUri: ?string,
78
78
  * encrypted: boolean,
79
79
  * keyId: ?string,
80
- * segments: !Array.<shaka.extern.SegmentDBV1>,
81
- * variantIds: !Array.<number>
80
+ * segments: !Array<shaka.extern.SegmentDBV1>,
81
+ * variantIds: !Array<number>
82
82
  * }}
83
83
  *
84
84
  * @property {number} id
@@ -112,9 +112,9 @@ shaka.extern.PeriodDBV1;
112
112
  * Whether this stream is encrypted.
113
113
  * @property {?string} keyId
114
114
  * The key ID this stream is encrypted with.
115
- * @property {!Array.<shaka.extern.SegmentDBV1>} segments
115
+ * @property {!Array<shaka.extern.SegmentDBV1>} segments
116
116
  * An array of segments that make up the stream.
117
- * @property {!Array.<number>} variantIds
117
+ * @property {!Array<number>} variantIds
118
118
  * An array of ids of variants the stream is a part of.
119
119
  */
120
120
  shaka.extern.StreamDBV1;