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
package/externs/lcevc.js CHANGED
@@ -5,11 +5,11 @@
5
5
  */
6
6
 
7
7
  /**
8
- * @fileoverview Externs for LcevcDec
9
- * compiler.
10
- *
11
- * @externs
12
- */
8
+ * @fileoverview Externs for LcevcDec
9
+ * compiler.
10
+ *
11
+ * @externs
12
+ */
13
13
 
14
14
  // This empty namespace is declared to check if LcevcDec libraries are loaded.
15
15
  /** @const */
@@ -18,9 +18,9 @@ var libDPIModule = {};
18
18
  var LCEVCdec = {};
19
19
 
20
20
  /**
21
- * LCEVC Dec constructor
22
- * @constructor
23
- */
21
+ * LCEVC Dec constructor
22
+ * @constructor
23
+ */
24
24
  LCEVCdec.LCEVCdec = class {
25
25
  /**
26
26
  * @param {HTMLVideoElement} media
@@ -13,6 +13,6 @@
13
13
 
14
14
  /**
15
15
  * @param {Object} policy
16
- * @return {!Promise.<string>}
16
+ * @return {!Promise<string>}
17
17
  */
18
18
  MediaKeys.prototype.getStatusForPolicy = function(policy) {};
@@ -37,8 +37,9 @@ const MediaSession = class {
37
37
  /** @type {string} */
38
38
  this.type = type;
39
39
 
40
- /** @type {!function(!{action: string, seekOffset: ?number,
41
- * seekTime: ?number})}
40
+ /**
41
+ * @type {!function(!{action: string, seekOffset: ?number,
42
+ * seekTime: ?number})}
42
43
  */
43
44
  this.callback = callback;
44
45
  }
@@ -29,10 +29,10 @@ mediaTailor.SessionResponse;
29
29
 
30
30
  /**
31
31
  * @typedef {{
32
- * avails: !Array.<mediaTailor.AdBreak>
32
+ * avails: !Array<mediaTailor.AdBreak>
33
33
  * }}
34
34
  *
35
- * @property {!Array.<mediaTailor.AdBreak>} avails
35
+ * @property {!Array<mediaTailor.AdBreak>} avails
36
36
  * @exportDoc
37
37
  */
38
38
  mediaTailor.TrackingResponse;
@@ -40,17 +40,17 @@ mediaTailor.TrackingResponse;
40
40
 
41
41
  /**
42
42
  * @typedef {{
43
- * adBreakTrackingEvents: !Array.<mediaTailor.TrackingEvent>,
44
- * ads: !Array.<mediaTailor.Ad>,
43
+ * adBreakTrackingEvents: !Array<mediaTailor.TrackingEvent>,
44
+ * ads: !Array<mediaTailor.Ad>,
45
45
  * durationInSeconds: number,
46
- * nonLinearAdsList: !Array.<mediaTailor.Ad>,
46
+ * nonLinearAdsList: !Array<mediaTailor.Ad>,
47
47
  * startTimeInSeconds: number
48
48
  * }}
49
49
  *
50
- * @property {!Array.<mediaTailor.TrackingEvent>} adBreakTrackingEvents
51
- * @property {!Array.<mediaTailor.Ad>} ads
50
+ * @property {!Array<mediaTailor.TrackingEvent>} adBreakTrackingEvents
51
+ * @property {!Array<mediaTailor.Ad>} ads
52
52
  * @property {number} durationInSeconds
53
- * @property {!Array.<mediaTailor.Ad>} nonLinearAdsList
53
+ * @property {!Array<mediaTailor.Ad>} nonLinearAdsList
54
54
  * @property {number} startTimeInSeconds
55
55
  * @exportDoc
56
56
  */
@@ -68,8 +68,8 @@ mediaTailor.AdBreak;
68
68
  * durationInSeconds: number,
69
69
  * skipOffset: ?string,
70
70
  * startTimeInSeconds: number,
71
- * nonLinearAdList: !Array.<mediaTailor.NonLinearAd>,
72
- * trackingEvents: !Array.<mediaTailor.TrackingEvent>
71
+ * nonLinearAdList: !Array<mediaTailor.NonLinearAd>,
72
+ * trackingEvents: !Array<mediaTailor.TrackingEvent>
73
73
  * }}
74
74
  *
75
75
  * @property {string} adId
@@ -81,8 +81,8 @@ mediaTailor.AdBreak;
81
81
  * @property {number} durationInSeconds
82
82
  * @property {?string} skipOffset
83
83
  * @property {number} startTimeInSeconds
84
- * @property {!Array.<mediaTailor.NonLinearAd>} nonLinearAdList
85
- * @property {!Array.<mediaTailor.TrackingEvent>} trackingEvents
84
+ * @property {!Array<mediaTailor.NonLinearAd>} nonLinearAdList
85
+ * @property {!Array<mediaTailor.TrackingEvent>} trackingEvents
86
86
  * @exportDoc
87
87
  */
88
88
  mediaTailor.Ad;
@@ -119,11 +119,11 @@ mediaTailor.NonLinearAd;
119
119
 
120
120
  /**
121
121
  * @typedef {{
122
- * beaconUrls: !Array.<string>,
122
+ * beaconUrls: !Array<string>,
123
123
  * eventType: string
124
124
  * }}
125
125
  *
126
- * @property {!Array.<string>} beaconUrls
126
+ * @property {!Array<string>} beaconUrls
127
127
  * @property {string} eventType
128
128
  * @exportDoc
129
129
  */
@@ -136,10 +136,10 @@ var mediaTailorExternalResource = {};
136
136
 
137
137
  /**
138
138
  * @typedef {{
139
- * apps: !Array.<mediaTailorExternalResource.App>
139
+ * apps: !Array<mediaTailorExternalResource.App>
140
140
  * }}
141
141
  *
142
- * @property {!Array.<mediaTailorExternalResource.App>} apps
142
+ * @property {!Array<mediaTailorExternalResource.App>} apps
143
143
  * @exportDoc
144
144
  */
145
145
  mediaTailorExternalResource.Response;
@@ -173,10 +173,10 @@ mediaTailorExternalResource.AppPlaceholder;
173
173
 
174
174
  /**
175
175
  * @typedef {{
176
- * source: !Array.<mediaTailorExternalResource.AppDataSource>
176
+ * source: !Array<mediaTailorExternalResource.AppDataSource>
177
177
  * }}
178
178
  *
179
- * @property {!Array.<mediaTailorExternalResource.AppDataSource>} source
179
+ * @property {!Array<mediaTailorExternalResource.AppDataSource>} source
180
180
  * @exportDoc
181
181
  */
182
182
  mediaTailorExternalResource.AppData;
@@ -51,6 +51,46 @@ HTMLMediaElement.prototype.webkitSupportsPresentationMode = function(mode) {};
51
51
  HTMLMediaElement.prototype.webkitPresentationMode;
52
52
 
53
53
 
54
+ /**
55
+ * @constructor
56
+ * @implements {EventTarget}
57
+ */
58
+ function PictureInPictureWindow() {}
59
+
60
+
61
+ /** @type {number} */
62
+ PictureInPictureWindow.prototype.width;
63
+
64
+
65
+ /** @type {number} */
66
+ PictureInPictureWindow.prototype.height;
67
+
68
+
69
+ /** @override */
70
+ PictureInPictureWindow.prototype.addEventListener =
71
+ function(type, listener, options) {};
72
+
73
+
74
+ /** @override */
75
+ PictureInPictureWindow.prototype.removeEventListener =
76
+ function(type, listener, options) {};
77
+
78
+
79
+ /** @override */
80
+ PictureInPictureWindow.prototype.dispatchEvent = function(event) {};
81
+
82
+
83
+ /**
84
+ * @constructor
85
+ * @extends {Event}
86
+ */
87
+ function PictureInPictureEvent() {}
88
+
89
+
90
+ /** @type {PictureInPictureWindow} */
91
+ PictureInPictureEvent.prototype.pictureInPictureWindow;
92
+
93
+
54
94
  /**
55
95
  * @typedef {{
56
96
  * width: (number|undefined),
@@ -69,7 +109,7 @@ function DocumentPictureInPicture() {}
69
109
 
70
110
  /**
71
111
  * @param {DocumentPictureInPictureOptions} options
72
- * @return {!Promise.<Window>}
112
+ * @return {!Promise<Window>}
73
113
  */
74
114
  DocumentPictureInPicture.prototype.requestWindow = function(options) {};
75
115
 
@@ -20,12 +20,12 @@ msdk.device = {};
20
20
 
21
21
 
22
22
  /**
23
- * @return {!Promise.<{resolution: string}>}
23
+ * @return {!Promise<{resolution: string}>}
24
24
  */
25
25
  msdk.device.getDisplayInfo = function() {};
26
26
 
27
27
 
28
28
  /**
29
- * @return {!Promise.<{resolution: string}>}
29
+ * @return {!Promise<{resolution: string}>}
30
30
  */
31
31
  msdk.device.getDisplayInfoImmediate = function() {};
@@ -49,7 +49,7 @@ HTMLMediaElement.prototype.generateKeyRequest =
49
49
  * @param {string} mimeType
50
50
  * @param {string=} keySystem
51
51
  * @return {string} '', 'maybe', or 'probably'
52
- * @override the standard one-argument version
52
+ * @override
53
53
  */
54
54
  HTMLVideoElement.prototype.canPlayType =
55
55
  function(mimeType, keySystem) {};
@@ -11,7 +11,7 @@
11
11
 
12
12
  /**
13
13
  * A representation of an abortable operation. Note that these are not
14
- * cancelable. Cancelation implies undoing what has been done so far,
14
+ * cancelable. Cancellation implies undoing what has been done so far,
15
15
  * whereas aborting only means that further work is stopped.
16
16
  *
17
17
  * @interface
@@ -26,7 +26,7 @@ shaka.extern.IAbortableOperation = class {
26
26
  * aborted. Aborted operations should be rejected with a shaka.util.Error
27
27
  * object using the error code OPERATION_ABORTED.
28
28
  *
29
- * @const {!Promise.<T>}
29
+ * @const {!Promise<T>}
30
30
  * @exportDoc
31
31
  */
32
32
  this.promise;
@@ -34,7 +34,7 @@ shaka.extern.IAbortableOperation = class {
34
34
 
35
35
  /**
36
36
  * Can be called by anyone holding this object to abort the underlying
37
- * operation. This is not cancelation, and will not necessarily result in
37
+ * operation. This is not cancellation, and will not necessarily result in
38
38
  * any work being undone. abort() should return a Promise which is resolved
39
39
  * when the underlying operation has been aborted. The returned Promise
40
40
  * should never be rejected.
@@ -49,7 +49,7 @@ shaka.extern.IAbortableOperation = class {
49
49
  * @param {function(boolean)} onFinal A callback to be invoked after the
50
50
  * operation succeeds or fails. The boolean argument is true
51
51
  * if the operation succeeded and false if it failed.
52
- * @return {!shaka.extern.IAbortableOperation.<T>} Returns this.
52
+ * @return {!shaka.extern.IAbortableOperation<T>} Returns this.
53
53
  * @exportDoc
54
54
  */
55
55
  finally(onFinal) {}
@@ -53,7 +53,7 @@ shaka.extern.AbrManager = class {
53
53
  /**
54
54
  * Updates manager's variants collection.
55
55
  *
56
- * @param {!Array.<!shaka.extern.Variant>} variants
56
+ * @param {!Array<!shaka.extern.Variant>} variants
57
57
  * @exportDoc
58
58
  */
59
59
  setVariants(variants) {}
@@ -11,7 +11,7 @@
11
11
 
12
12
  /**
13
13
  * @typedef {{
14
- * loadTimes: !Array.<number>,
14
+ * loadTimes: !Array<number>,
15
15
  * averageLoadTime: number,
16
16
  * started: number,
17
17
  * playedCompletely: number,
@@ -60,6 +60,7 @@ shaka.extern.AdCuePoint;
60
60
  /**
61
61
  * @typedef {{
62
62
  * id: ?string,
63
+ * groupId: ?string,
63
64
  * startTime: number,
64
65
  * endTime: ?number,
65
66
  * uri: string,
@@ -73,7 +74,9 @@ shaka.extern.AdCuePoint;
73
74
  * once: boolean,
74
75
  * pre: boolean,
75
76
  * post: boolean,
76
- * timelineRange: boolean
77
+ * timelineRange: boolean,
78
+ * loop: boolean,
79
+ * overlay: ?shaka.extern.AdInterstitialOverlay
77
80
  * }}
78
81
  *
79
82
  * @description
@@ -81,6 +84,8 @@ shaka.extern.AdCuePoint;
81
84
  *
82
85
  * @property {?string} id
83
86
  * The id of the interstitial.
87
+ * @property {?string} groupId
88
+ * The group id of the interstitial.
84
89
  * @property {number} startTime
85
90
  * The start time of the interstitial.
86
91
  * @property {?number} endTime
@@ -119,10 +124,39 @@ shaka.extern.AdCuePoint;
119
124
  * @property {boolean} timelineRange
120
125
  * Indicates whether the interstitial should be presented in a timeline UI
121
126
  * as a single point or as a range.
127
+ * @property {boolean} loop
128
+ * Indicates that the interstitials should play in loop.
129
+ * Only applies if the interstitials is an overlay.
130
+ * Only supported when using multiple video elements for interstitials.
131
+ * @property {?shaka.extern.AdInterstitialOverlay} overlay
132
+ * Indicates the characteristics of the overlay
133
+ * Only supported when using multiple video elements for interstitials.
134
+ * @exportDoc
122
135
  */
123
136
  shaka.extern.AdInterstitial;
124
137
 
125
138
 
139
+ /**
140
+ * @typedef {{
141
+ * viewport: {x: number, y: number},
142
+ * topLeft: {x: number, y: number},
143
+ * size: {x: number, y: number}
144
+ * }}
145
+ *
146
+ * @description
147
+ * Contains the ad interstitial overlay info.
148
+ *
149
+ * @property {{x: number, y: number}} viewport
150
+ * The viewport in pixels.
151
+ * @property {{x: number, y: number}} topLeft
152
+ * The topLeft in pixels.
153
+ * @property {{x: number, y: number}} size
154
+ * The size in pixels.
155
+ * @exportDoc
156
+ */
157
+ shaka.extern.AdInterstitialOverlay;
158
+
159
+
126
160
  /**
127
161
  * An object that's responsible for all the ad-related logic
128
162
  * in the player.
@@ -184,7 +218,7 @@ shaka.extern.IAdManager = class extends EventTarget {
184
218
  * @param {string} url
185
219
  * @param {Object} adsParams
186
220
  * @param {string=} backupUrl
187
- * @return {!Promise.<string>}
221
+ * @return {!Promise<string>}
188
222
  */
189
223
  requestMediaTailorStream(url, adsParams, backupUrl) {}
190
224
 
@@ -202,7 +236,7 @@ shaka.extern.IAdManager = class extends EventTarget {
202
236
  /**
203
237
  * @param {!google.ima.dai.api.StreamRequest} imaRequest
204
238
  * @param {string=} backupUrl
205
- * @return {!Promise.<string>}
239
+ * @return {!Promise<string>}
206
240
  */
207
241
  requestServerSideStream(imaRequest, backupUrl) {}
208
242
 
@@ -212,12 +246,12 @@ shaka.extern.IAdManager = class extends EventTarget {
212
246
  replaceServerSideAdTagParameters(adTagParameters) {}
213
247
 
214
248
  /**
215
- * @return {!Array.<!shaka.extern.AdCuePoint>}
249
+ * @return {!Array<!shaka.extern.AdCuePoint>}
216
250
  */
217
251
  getServerSideCuePoints() {}
218
252
 
219
253
  /**
220
- * @return {!Array.<!shaka.extern.AdCuePoint>}
254
+ * @return {!Array<!shaka.extern.AdCuePoint>}
221
255
  */
222
256
  getCuePoints() {}
223
257
 
@@ -274,6 +308,11 @@ shaka.extern.IAdManager = class extends EventTarget {
274
308
  * @return {!Promise}
275
309
  */
276
310
  addAdUrlInterstitial(url) {}
311
+
312
+ /**
313
+ * @return {shaka.Player}
314
+ */
315
+ getInterstitialPlayer() {}
277
316
  };
278
317
 
279
318
 
@@ -72,7 +72,7 @@ shaka.extern.ICaptionDecoder = class {
72
72
  /**
73
73
  * Decodes all currently extracted packets and then clears them.
74
74
  * This should be called once for a set of extracts (see comment on extract).
75
- * @return {!Array.<!shaka.extern.ICaptionDecoder.ClosedCaption>}
75
+ * @return {!Array<!shaka.extern.ICaptionDecoder.ClosedCaption>}
76
76
  * @exportDoc
77
77
  */
78
78
  decode() {}
@@ -87,7 +87,7 @@ shaka.extern.ICaptionDecoder = class {
87
87
 
88
88
  /**
89
89
  * Returns the streams that the CEA decoder found.
90
- * @return {!Array.<string>}
90
+ * @return {!Array<string>}
91
91
  * @exportDoc
92
92
  */
93
93
  getStreams() {}
@@ -14,7 +14,7 @@
14
14
  * packetLength: number,
15
15
  * pts: ?number,
16
16
  * dts: ?number,
17
- * nalus: !Array.<!shaka.extern.VideoNalu>
17
+ * nalus: !Array<!shaka.extern.VideoNalu>
18
18
  * }}
19
19
  *
20
20
  * @summary MPEG_PES.
@@ -22,7 +22,7 @@
22
22
  * @property {number} packetLength
23
23
  * @property {?number} pts
24
24
  * @property {?number} dts
25
- * @property {!Array.<!shaka.extern.VideoNalu>} nalus
25
+ * @property {!Array<!shaka.extern.VideoNalu>} nalus
26
26
  */
27
27
  shaka.extern.MPEG_PES;
28
28
 
@@ -34,7 +34,7 @@ shaka.extern.MPEG_PES;
34
34
  * isKeyframe: boolean,
35
35
  * pts: ?number,
36
36
  * dts: ?number,
37
- * nalus: !Array.<!shaka.extern.VideoNalu>
37
+ * nalus: !Array<!shaka.extern.VideoNalu>
38
38
  * }}
39
39
  *
40
40
  * @summary VideoSample.
@@ -43,7 +43,7 @@ shaka.extern.MPEG_PES;
43
43
  * @property {boolean} isKeyframe
44
44
  * @property {?number} pts
45
45
  * @property {?number} dts
46
- * @property {!Array.<!shaka.extern.VideoNalu>} nalus
46
+ * @property {!Array<!shaka.extern.VideoNalu>} nalus
47
47
  */
48
48
  shaka.extern.VideoSample;
49
49
 
@@ -38,7 +38,7 @@ shaka.extern.InitDataOverride;
38
38
  * @typedef {{
39
39
  * keySystem: string,
40
40
  * encryptionScheme: string,
41
- * keySystemUris: (Set.<string>|undefined),
41
+ * keySystemUris: (Set<string>|undefined),
42
42
  * licenseServerUri: string,
43
43
  * distinctiveIdentifierRequired: boolean,
44
44
  * persistentStateRequired: boolean,
@@ -47,8 +47,8 @@ shaka.extern.InitDataOverride;
47
47
  * serverCertificate: Uint8Array,
48
48
  * serverCertificateUri: string,
49
49
  * sessionType: string,
50
- * initData: Array.<!shaka.extern.InitDataOverride>,
51
- * keyIds: Set.<string>
50
+ * initData: Array<!shaka.extern.InitDataOverride>,
51
+ * keyIds: Set<string>
52
52
  * }}
53
53
  *
54
54
  * @description
@@ -60,7 +60,7 @@ shaka.extern.InitDataOverride;
60
60
  * @property {string} encryptionScheme
61
61
  * <i>Required.</i> <br>
62
62
  * The encryption scheme, e.g., "cenc", "cbcs", "cbcs-1-9".
63
- * @property {(Set.<string>|undefined)} keySystemUris
63
+ * @property {(Set<string>|undefined)} keySystemUris
64
64
  * <i>Optional.</i> <br>
65
65
  * The key system uri, e.g., "skd://" for fairplay.
66
66
  * @property {string} licenseServerUri
@@ -95,11 +95,11 @@ shaka.extern.InitDataOverride;
95
95
  * <i>Defaults to '', e.g., server certificate will be requested from the
96
96
  * given URI if serverCertificate is not provided. Can be filled in by
97
97
  * advanced DRM config.</i>
98
- * @property {Array.<!shaka.extern.InitDataOverride>} initData
98
+ * @property {Array<!shaka.extern.InitDataOverride>} initData
99
99
  * <i>Defaults to [], e.g., no override.</i> <br>
100
100
  * A list of initialization data which override any initialization data found
101
101
  * in the content. See also shaka.extern.InitDataOverride.
102
- * @property {Set.<string>} keyIds
102
+ * @property {Set<string>} keyIds
103
103
  * <i>Defaults to the empty Set</i> <br>
104
104
  * If not empty, contains the default key IDs for this key system, as
105
105
  * lowercase hex strings.
@@ -13,16 +13,16 @@
13
13
  /**
14
14
  * @typedef {{
15
15
  * hasAppRestrictions: boolean,
16
- * missingKeys: !Array.<string>,
17
- * restrictedKeyStatuses: !Array.<string>
16
+ * missingKeys: !Array<string>,
17
+ * restrictedKeyStatuses: !Array<string>
18
18
  * }}
19
19
  *
20
20
  * @property {boolean} hasAppRestrictions
21
21
  * Whether there are streams that are restricted due to app-provided
22
22
  * restrictions.
23
- * @property {!Array.<string>} missingKeys
23
+ * @property {!Array<string>} missingKeys
24
24
  * The key IDs that were missing.
25
- * @property {!Array.<string>} restrictedKeyStatuses
25
+ * @property {!Array<string>} restrictedKeyStatuses
26
26
  * The restricted EME key statuses that the streams had. For example,
27
27
  * 'output-restricted' would mean streams couldn't play due to restrictions
28
28
  * on the output device (e.g. HDCP).
@@ -56,7 +56,7 @@ shaka.extern.Error = class {
56
56
  this.code;
57
57
 
58
58
  /**
59
- * @const {!Array.<*>}
59
+ * @const {!Array<*>}
60
60
  * @exportDoc
61
61
  */
62
62
  this.data;