shaka-player 3.2.3 → 3.2.6

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 (325) hide show
  1. package/.csslintrc +11 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  3. package/.github/workflows/build-and-test.yaml +130 -0
  4. package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
  5. package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
  6. package/.github/workflows/demo-version-index.yaml +29 -0
  7. package/.github/workflows/nightly-demo.yaml +42 -0
  8. package/.github/workflows/release-please.yaml +147 -0
  9. package/.github/workflows/safari-homedir-launcher.sh +18 -0
  10. package/.github/workflows/selenium-lab-tests.yaml +93 -0
  11. package/AUTHORS +2 -0
  12. package/CHANGELOG.md +1587 -1551
  13. package/CONTRIBUTING.md +2 -2
  14. package/CONTRIBUTORS +2 -0
  15. package/README.md +7 -7
  16. package/app-engine/README.md +9 -0
  17. package/app-engine/demo-version-index/README.md +14 -0
  18. package/app-engine/demo-version-index/app.yaml +2 -0
  19. package/app-engine/demo-version-index/main.py +162 -0
  20. package/app-engine/demo-version-index/requirements.txt +6 -0
  21. package/app-engine/demo-version-index/templates/index.html +114 -0
  22. package/app-engine/shaka-player-demo/README.md +18 -0
  23. package/app-engine/shaka-player-demo/app.yaml +61 -0
  24. package/app-engine/shaka-player-demo/main.py +95 -0
  25. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  26. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  27. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  28. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  29. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  30. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  31. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  32. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  33. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  34. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  35. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  36. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  37. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  38. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  39. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  40. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  41. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  42. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  43. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  44. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  45. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  46. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  47. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  48. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  49. package/app-engine/shaka-player-demo/posters/sources.txt +46 -0
  50. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  51. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  52. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  53. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  54. package/app-engine/shaka-player-demo/posters.py +110 -0
  55. package/app-engine/shaka-player-demo/requirements.txt +5 -0
  56. package/app-engine/shaka-player-demo/time.txt +1 -0
  57. package/build/README.md +1 -1
  58. package/build/checkversion.py +1 -1
  59. package/build/conformance.textproto +13 -0
  60. package/build/docker/Dockerfile +20 -0
  61. package/build/docker/docker-compose.yml +10 -0
  62. package/build/gendeps.py +18 -15
  63. package/build/generateTsDefs.py +2 -0
  64. package/build/shaka-lab.yaml +163 -0
  65. package/build/shakaBuildHelpers.py +4 -29
  66. package/build/test.py +93 -28
  67. package/build/wrapper.template.js +2 -2
  68. package/demo/TengwarTelcontar.woff2 +0 -0
  69. package/demo/asset_card.js +1 -2
  70. package/demo/cast_receiver/index.html +1 -1
  71. package/demo/cast_receiver/receiver_app.css +14 -14
  72. package/demo/common/assets.js +2 -0
  73. package/demo/config.js +0 -1
  74. package/demo/custom.js +0 -1
  75. package/demo/customWarning.txt +2 -2
  76. package/demo/demo.less +29 -18
  77. package/demo/demo_uncompiled.js +1 -13
  78. package/demo/index.html +1 -1
  79. package/demo/main.js +3 -3
  80. package/dist/controls.css +2 -2
  81. package/dist/controls.css.map +1 -1
  82. package/dist/demo.compiled.debug.js +191 -194
  83. package/dist/demo.compiled.debug.map +4 -4
  84. package/dist/demo.compiled.js +191 -194
  85. package/dist/demo.compiled.map +4 -4
  86. package/dist/demo.css +1 -1
  87. package/dist/demo.css.map +1 -1
  88. package/dist/deps.js +225 -219
  89. package/dist/locales.js +27 -27
  90. package/dist/receiver.compiled.debug.js +43 -45
  91. package/dist/receiver.compiled.debug.map +4 -4
  92. package/dist/receiver.compiled.js +43 -45
  93. package/dist/receiver.compiled.map +4 -4
  94. package/dist/shaka-player.compiled.d.ts +228 -225
  95. package/dist/shaka-player.compiled.debug.d.ts +228 -225
  96. package/dist/shaka-player.compiled.debug.externs.js +21 -15
  97. package/dist/shaka-player.compiled.debug.js +326 -333
  98. package/dist/shaka-player.compiled.debug.map +4 -4
  99. package/dist/shaka-player.compiled.externs.js +21 -15
  100. package/dist/shaka-player.compiled.js +818 -821
  101. package/dist/shaka-player.compiled.map +4 -4
  102. package/dist/shaka-player.ui.d.ts +272 -278
  103. package/dist/shaka-player.ui.debug.d.ts +272 -278
  104. package/dist/shaka-player.ui.debug.externs.js +23 -26
  105. package/dist/shaka-player.ui.debug.js +259 -267
  106. package/dist/shaka-player.ui.debug.map +4 -4
  107. package/dist/shaka-player.ui.externs.js +23 -26
  108. package/dist/shaka-player.ui.js +963 -968
  109. package/dist/shaka-player.ui.map +4 -4
  110. package/docs/design/REDESIGN.md +33 -33
  111. package/docs/design/codec_preferences.md +1 -1
  112. package/docs/design/dash-audio-channels.md +3 -3
  113. package/docs/design/dash-manifests.md +1 -1
  114. package/docs/design/gap-jumping.md +3 -3
  115. package/docs/design/preload.md +2 -2
  116. package/docs/tutorials/faq.md +8 -8
  117. package/docs/tutorials/index.json +1 -0
  118. package/docs/tutorials/plugins.md +3 -3
  119. package/docs/tutorials/selenium-grid-config.md +122 -0
  120. package/docs/tutorials/welcome.md +10 -2
  121. package/karma.conf.js +156 -45
  122. package/lib/abr/simple_abr_manager.js +12 -6
  123. package/lib/ads/ad_manager.js +1 -0
  124. package/lib/cast/cast_proxy.js +6 -4
  125. package/lib/cast/cast_receiver.js +3 -0
  126. package/lib/cea/cea608_data_channel.js +2 -2
  127. package/lib/cea/cea708_service.js +5 -4
  128. package/lib/cea/mp4_cea_parser.js +11 -5
  129. package/lib/cea/sei_processor.js +6 -3
  130. package/lib/dash/dash_parser.js +40 -30
  131. package/lib/dash/mpd_utils.js +4 -5
  132. package/lib/dash/segment_list.js +1 -2
  133. package/lib/dash/segment_template.js +3 -3
  134. package/lib/hls/hls_parser.js +11 -9
  135. package/lib/hls/manifest_text_parser.js +4 -3
  136. package/lib/media/adaptation_set.js +1 -2
  137. package/lib/media/content_workarounds.js +2 -2
  138. package/lib/media/drm_engine.js +3 -2
  139. package/lib/media/media_source_engine.js +3 -2
  140. package/lib/media/mp4_segment_index_parser.js +1 -4
  141. package/lib/media/playhead.js +2 -2
  142. package/lib/media/presentation_timeline.js +18 -8
  143. package/lib/media/region_observer.js +39 -33
  144. package/lib/media/region_timeline.js +17 -19
  145. package/lib/media/streaming_engine.js +7 -7
  146. package/lib/media/time_ranges_utils.js +1 -3
  147. package/lib/media/video_wrapper.js +1 -1
  148. package/lib/net/networking_engine.js +5 -1
  149. package/lib/offline/storage.js +12 -13
  150. package/lib/player.js +58 -24
  151. package/lib/polyfill/all.js +2 -3
  152. package/lib/polyfill/encryption_scheme.js +1 -1
  153. package/lib/polyfill/media_capabilities.js +3 -3
  154. package/lib/polyfill/mediasource.js +1 -1
  155. package/lib/text/cue.js +1 -1
  156. package/lib/text/simple_text_displayer.js +2 -1
  157. package/lib/text/ttml_text_parser.js +8 -5
  158. package/lib/text/ui_text_displayer.js +1 -1
  159. package/lib/util/buffer_utils.js +1 -3
  160. package/lib/util/ebml_parser.js +3 -3
  161. package/lib/util/error.js +1 -1
  162. package/lib/util/fake_event_target.js +21 -1
  163. package/lib/util/iterables.js +0 -46
  164. package/lib/util/mp4_box_parsers.js +1 -4
  165. package/lib/util/mp4_parser.js +5 -7
  166. package/lib/util/periods.js +8 -9
  167. package/lib/util/platform.js +3 -3
  168. package/lib/util/pssh.js +1 -4
  169. package/lib/util/stream_utils.js +4 -3
  170. package/lib/util/string_utils.js +3 -5
  171. package/lib/util/uint8array_utils.js +3 -5
  172. package/lib/util/xml_utils.js +15 -7
  173. package/package.json +62 -40
  174. package/roadmap.md +17 -17
  175. package/test/abr/simple_abr_manager_unit.js +3 -8
  176. package/test/ads/ad_manager_unit.js +0 -6
  177. package/test/cast/cast_proxy_unit.js +0 -8
  178. package/test/cast/cast_receiver_integration.js +1 -18
  179. package/test/cast/cast_receiver_unit.js +1 -9
  180. package/test/cast/cast_sender_unit.js +0 -6
  181. package/test/cast/cast_utils_unit.js +0 -13
  182. package/test/cea/cea608_memory_unit.js +0 -5
  183. package/test/cea/cea708_service_unit.js +0 -7
  184. package/test/cea/cea708_window_unit.js +0 -5
  185. package/test/cea/cea_decoder_unit.js +0 -6
  186. package/test/cea/dtvcc_packet_builder_unit.js +0 -3
  187. package/test/cea/dtvcc_packet_unit.js +0 -5
  188. package/test/cea/mp4_cea_parser_unit.js +0 -4
  189. package/test/dash/dash_parser_content_protection_unit.js +1 -10
  190. package/test/dash/dash_parser_live_unit.js +45 -15
  191. package/test/dash/dash_parser_manifest_unit.js +4 -17
  192. package/test/dash/dash_parser_segment_base_unit.js +1 -8
  193. package/test/dash/dash_parser_segment_list_unit.js +1 -7
  194. package/test/dash/dash_parser_segment_template_unit.js +0 -9
  195. package/test/dash/mpd_utils_unit.js +3 -11
  196. package/test/demo/demo_unit.js +0 -5
  197. package/test/deprecate/enforcer_unit.js +0 -4
  198. package/test/deprecate/version_unit.js +0 -2
  199. package/test/hls/hls_live_unit.js +2 -14
  200. package/test/hls/hls_parser_unit.js +76 -15
  201. package/test/hls/manifest_text_parser_unit.js +0 -10
  202. package/test/media/adaptation_set_criteria_unit.js +3 -7
  203. package/test/media/adaptation_set_unit.js +0 -2
  204. package/test/media/buffering_observer_unit.js +1 -4
  205. package/test/media/closed_caption_parser_unit.js +0 -3
  206. package/test/media/drm_engine_integration.js +2 -15
  207. package/test/media/drm_engine_unit.js +4 -24
  208. package/test/media/manifest_parser_unit.js +0 -4
  209. package/test/media/media_source_engine_integration.js +0 -7
  210. package/test/media/media_source_engine_unit.js +1 -14
  211. package/test/media/mp4_segment_index_parser_unit.js +0 -4
  212. package/test/media/play_rate_controller_unit.js +0 -4
  213. package/test/media/playhead_unit.js +8 -16
  214. package/test/media/presentation_timeline_unit.js +4 -7
  215. package/test/media/region_observer_unit.js +40 -10
  216. package/test/media/region_timeline_unit.js +40 -25
  217. package/test/media/segment_index_unit.js +0 -6
  218. package/test/media/segment_reference_unit.js +0 -3
  219. package/test/media/stall_detector_unit.js +0 -5
  220. package/test/media/streaming_engine_integration.js +9 -36
  221. package/test/media/streaming_engine_unit.js +11 -35
  222. package/test/media/time_ranges_utils_unit.js +0 -2
  223. package/test/media/transmuxer_integration.js +0 -6
  224. package/test/media/webm_segment_index_parser_unit.js +0 -4
  225. package/test/net/data_uri_plugin_unit.js +0 -7
  226. package/test/net/http_plugin_unit.js +0 -9
  227. package/test/net/networking_engine_unit.js +0 -11
  228. package/test/offline/download_progress_estimator_unit.js +0 -2
  229. package/test/offline/indexeddb_storage_unit.js +0 -6
  230. package/test/offline/manifest_convert_unit.js +0 -8
  231. package/test/offline/offline_integration.js +1 -10
  232. package/test/offline/offline_manifest_parser_unit.js +0 -6
  233. package/test/offline/offline_scheme_unit.js +0 -8
  234. package/test/offline/offline_uri_unit.js +0 -2
  235. package/test/offline/storage_compatibility_unit.js +1 -14
  236. package/test/offline/storage_integration.js +1 -25
  237. package/test/player_external.js +2 -10
  238. package/test/player_integration.js +21 -28
  239. package/test/player_load_graph_integration.js +1 -6
  240. package/test/player_src_equals_external.js +3 -9
  241. package/test/player_src_equals_integration.js +0 -7
  242. package/test/player_unit.js +52 -37
  243. package/test/routing/walker_unit.js +0 -8
  244. package/test/test/assets/large_file.mpd +1 -1
  245. package/test/test/boot.js +75 -22
  246. package/test/test/externs/jasmine.js +2 -2
  247. package/test/test/externs/karma.js +4 -0
  248. package/test/test/namespace.js +10 -0
  249. package/test/test/util/canned_idb.js +0 -8
  250. package/test/test/util/cea_utils.js +0 -6
  251. package/test/test/util/dash_parser_util.js +0 -13
  252. package/test/test/util/fake_ad.js +0 -3
  253. package/test/test/util/fake_ad_manager.js +0 -9
  254. package/test/test/util/fake_demo_main.js +0 -5
  255. package/test/test/util/fake_drm_engine.js +0 -6
  256. package/test/test/util/fake_media_source_engine.js +0 -7
  257. package/test/test/util/fake_networking_engine.js +0 -5
  258. package/test/test/util/fake_text_displayer.js +0 -5
  259. package/test/test/util/indexeddb_utils.js +1 -10
  260. package/test/test/util/jasmine_fetch.js +0 -1
  261. package/test/test/util/loader.js +0 -18
  262. package/test/test/util/manifest_generator.js +9 -14
  263. package/test/test/util/manifest_parser_util.js +0 -6
  264. package/test/test/util/offline_utils.js +0 -5
  265. package/test/test/util/simple_fakes.js +9 -26
  266. package/test/test/util/stream_generator.js +0 -14
  267. package/test/test/util/streaming_engine_util.js +0 -15
  268. package/test/test/util/test_scheme.js +1 -19
  269. package/test/test/util/ttml_utils.js +0 -2
  270. package/test/test/util/ui_utils.js +0 -9
  271. package/test/test/util/util.js +15 -26
  272. package/test/test/util/waiter.js +84 -43
  273. package/test/text/cue_integration.js +0 -4
  274. package/test/text/lrc_text_parser_unit.js +0 -4
  275. package/test/text/mp4_ttml_parser_unit.js +0 -6
  276. package/test/text/mp4_vtt_parser_unit.js +1 -7
  277. package/test/text/sbv_text_parser_unit.js +0 -4
  278. package/test/text/simple_text_displayer_unit.js +1 -8
  279. package/test/text/srt_text_parser_unit.js +0 -4
  280. package/test/text/ssa_text_parser_unit.js +0 -5
  281. package/test/text/text_engine_unit.js +2 -7
  282. package/test/text/text_track_integration.js +0 -2
  283. package/test/text/ttml_text_parser_unit.js +2 -11
  284. package/test/text/ui_text_displayer_unit.js +44 -41
  285. package/test/text/vtt_text_parser_unit.js +0 -9
  286. package/test/text/web_vtt_generator_unit.js +0 -3
  287. package/test/ui/ad_ui_unit.js +0 -11
  288. package/test/ui/localization_unit.js +0 -3
  289. package/test/ui/text_displayer_layout_unit.js +9 -19
  290. package/test/ui/ui_customization_unit.js +0 -6
  291. package/test/ui/ui_integration.js +0 -16
  292. package/test/ui/ui_unit.js +1 -17
  293. package/test/util/abortable_operation_unit.js +4 -9
  294. package/test/util/array_utils_unit.js +0 -2
  295. package/test/util/buffer_utils_unit.js +0 -2
  296. package/test/util/data_view_reader_unit.js +0 -4
  297. package/test/util/ebml_parser_unit.js +0 -4
  298. package/test/util/event_manager_unit.js +0 -3
  299. package/test/util/fake_event_target_unit.js +0 -5
  300. package/test/util/functional_unit.js +1 -1
  301. package/test/util/iterables_unit.js +0 -64
  302. package/test/util/language_utils_unit.js +0 -3
  303. package/test/util/manifest_parser_utils_unit.js +0 -2
  304. package/test/util/mp4_box_parsers_unit.js +0 -5
  305. package/test/util/mp4_parser_unit.js +0 -4
  306. package/test/util/multi_map_unit.js +0 -3
  307. package/test/util/object_utils_unit.js +0 -2
  308. package/test/util/periods_unit.js +14 -7
  309. package/test/util/pssh_unit.js +0 -5
  310. package/test/util/state_history_unit.js +0 -2
  311. package/test/util/stream_utils_unit.js +3 -8
  312. package/test/util/string_utils_unit.js +0 -6
  313. package/test/util/text_parser_unit.js +0 -2
  314. package/test/util/xml_utils_unit.js +0 -4
  315. package/ui/controls.js +3 -0
  316. package/ui/less/ad_controls.less +6 -6
  317. package/ui/less/buttons.less +6 -6
  318. package/ui/less/containers.less +9 -11
  319. package/ui/less/overflow_menu.less +4 -4
  320. package/ui/less/range_elements.less +7 -2
  321. package/ui/locales/sjn-translations.yaml +257 -0
  322. package/ui/locales/sjn.json +42 -0
  323. package/ui/localization.js +12 -36
  324. package/ui/seek_bar.js +2 -1
  325. package/externs/svgelement.js +0 -18
@@ -6,26 +6,30 @@
6
6
 
7
7
  goog.provide('shaka.media.RegionTimeline');
8
8
 
9
+ goog.require('shaka.util.FakeEvent');
10
+ goog.require('shaka.util.FakeEventTarget');
9
11
  goog.require('shaka.util.IReleasable');
10
12
  goog.require('shaka.util.Timer');
11
13
 
12
14
 
13
15
  /**
14
16
  * The region timeline is a set of unique timeline region info entries. When
15
- * a new entry is added, the |onAddRegion| callback will be called.
17
+ * a new entry is added, the 'regionadd' event will be fired. When an entry is
18
+ * deleted, the 'regionremove' event will be fired.
16
19
  *
17
20
  * @implements {shaka.util.IReleasable}
18
21
  * @final
19
22
  */
20
- shaka.media.RegionTimeline = class {
23
+ shaka.media.RegionTimeline = class extends shaka.util.FakeEventTarget {
21
24
  /**
22
25
  * @param {!function():{start: number, end: number}} getSeekRange
23
26
  */
24
27
  constructor(getSeekRange) {
25
- /** @private {function(shaka.extern.TimelineRegionInfo)} */
26
- this.onAddRegion_ = (region) => {};
28
+ super();
29
+
27
30
  /** @private {!Set.<shaka.extern.TimelineRegionInfo>} */
28
31
  this.regions_ = new Set();
32
+
29
33
  /** @private {!function():{start: number, end: number}} */
30
34
  this.getSeekRange_ = getSeekRange;
31
35
 
@@ -44,22 +48,9 @@ shaka.media.RegionTimeline = class {
44
48
 
45
49
  /** @override */
46
50
  release() {
47
- // Prevent us from holding onto any external references via the callback.
48
- this.onAddRegion_ = (region) => {};
49
51
  this.regions_.clear();
50
52
  this.filterTimer_.stop();
51
- }
52
-
53
- /**
54
- * Set the callbacks for events. This will override any previous calls to
55
- * |setListeners|.
56
- *
57
- * @param {function(shaka.extern.TimelineRegionInfo)} onAddRegion
58
- * Set the callback for when we add a new region. This callback will only
59
- * be called when a region is unique (we reject duplicate regions).
60
- */
61
- setListeners(onAddRegion) {
62
- this.onAddRegion_ = onAddRegion;
53
+ super.release();
63
54
  }
64
55
 
65
56
  /**
@@ -72,7 +63,10 @@ shaka.media.RegionTimeline = class {
72
63
  // instead of making the parser track it.
73
64
  if (similarRegion == null) {
74
65
  this.regions_.add(region);
75
- this.onAddRegion_(region);
66
+ const event = new shaka.util.FakeEvent('regionadd', new Map([
67
+ ['region', region],
68
+ ]));
69
+ this.dispatchEvent(event);
76
70
  }
77
71
  }
78
72
 
@@ -89,6 +83,10 @@ shaka.media.RegionTimeline = class {
89
83
  // reson to store or process them.
90
84
  if (region.endTime < seekRange.start) {
91
85
  this.regions_.delete(region);
86
+ const event = new shaka.util.FakeEvent('regionremove', new Map([
87
+ ['region', region],
88
+ ]));
89
+ this.dispatchEvent(event);
92
90
  }
93
91
  }
94
92
  }
@@ -669,7 +669,7 @@ shaka.media.StreamingEngine = class {
669
669
 
670
670
  if (mediaState.waitingToClearBuffer) {
671
671
  // May not be performing an update, but an update will still happen.
672
- // See: https://github.com/google/shaka-player/issues/334
672
+ // See: https://github.com/shaka-project/shaka-player/issues/334
673
673
  shaka.log.debug(logPrefix, 'clear: already waiting');
674
674
  return;
675
675
  }
@@ -909,9 +909,9 @@ shaka.media.StreamingEngine = class {
909
909
  // buffering forever at the end.
910
910
  // We should only do this if the duration needs to shrink.
911
911
  // Growing it by less than 1ms can actually cause buffering on
912
- // replay, as in https://github.com/google/shaka-player/issues/979
912
+ // replay, as in https://github.com/shaka-project/shaka-player/issues/979
913
913
  // On some platforms, this can spuriously be 0, so ignore this case.
914
- // https://github.com/google/shaka-player/issues/1967,
914
+ // https://github.com/shaka-project/shaka-player/issues/1967,
915
915
  const duration = this.playerInterface_.mediaSourceEngine.getDuration();
916
916
  if (duration != 0 &&
917
917
  duration < this.manifest_.presentationTimeline.getDuration()) {
@@ -1644,7 +1644,7 @@ shaka.media.StreamingEngine = class {
1644
1644
  // See DASH sec. 5.10.3.3.1
1645
1645
  // If a DASH client detects an event message box with a scheme that is not
1646
1646
  // defined in MPD, the client is expected to ignore it.
1647
- if (emsgSchemeIdUris.includes(schemeId)) {
1647
+ if (emsgSchemeIdUris && emsgSchemeIdUris.includes(schemeId)) {
1648
1648
  // See DASH sec. 5.10.4.1
1649
1649
  // A special scheme in DASH used to signal manifest updates.
1650
1650
  if (schemeId == 'urn:mpeg:dash:event:2012') {
@@ -1702,7 +1702,7 @@ shaka.media.StreamingEngine = class {
1702
1702
  const bufferedBehind = presentationTime - startTime;
1703
1703
 
1704
1704
  const overflow = bufferedBehind - bufferBehind;
1705
- // See: https://github.com/google/shaka-player/issues/2982
1705
+ // See: https://github.com/shaka-project/shaka-player/issues/2982
1706
1706
  if (overflow <= 0.01) {
1707
1707
  shaka.log.v2(logPrefix,
1708
1708
  'buffer behind okay:',
@@ -2041,7 +2041,7 @@ shaka.media.StreamingEngine.MediaState_;
2041
2041
  * of the Period.
2042
2042
  *
2043
2043
  * NOTE: This was increased as part of the solution to
2044
- * https://github.com/google/shaka-player/issues/1281
2044
+ * https://github.com/shaka-project/shaka-player/issues/1281
2045
2045
  *
2046
2046
  * @const {number}
2047
2047
  * @private
@@ -2055,7 +2055,7 @@ shaka.media.StreamingEngine.APPEND_WINDOW_START_FUDGE_ = 0.1;
2055
2055
  * the Period. This rounding error could then create an artificial gap and a
2056
2056
  * stutter when the gap-jumping logic takes over.
2057
2057
  *
2058
- * https://github.com/google/shaka-player/issues/1597
2058
+ * https://github.com/shaka-project/shaka-player/issues/1597
2059
2059
  *
2060
2060
  * @const {number}
2061
2061
  * @private
@@ -6,8 +6,6 @@
6
6
 
7
7
  goog.provide('shaka.media.TimeRangesUtils');
8
8
 
9
- goog.require('shaka.util.Iterables');
10
-
11
9
 
12
10
  /**
13
11
  * @summary A set of utility functions for dealing with TimeRanges objects.
@@ -157,7 +155,7 @@ shaka.media.TimeRangesUtils = class {
157
155
  return [];
158
156
  }
159
157
  const ret = [];
160
- for (const i of shaka.util.Iterables.range(b.length)) {
158
+ for (let i = 0; i < b.length; i++) {
161
159
  ret.push({start: b.start(i), end: b.end(i)});
162
160
  }
163
161
  return ret;
@@ -141,7 +141,7 @@ shaka.media.VideoWrapper = class {
141
141
  // TODO: Need further investigation why it happens. Before and after
142
142
  // setting the current time, video.readyState is 1, video.paused is true,
143
143
  // and video.buffered's TimeRanges length is 0.
144
- // See: https://github.com/google/shaka-player/issues/1298
144
+ // See: https://github.com/shaka-project/shaka-player/issues/1298
145
145
  this.mover_.moveTo(
146
146
  this.video_.currentTime == 0 ?
147
147
  startTime :
@@ -222,6 +222,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
222
222
  this.destroyed_ = true;
223
223
  this.requestFilters_.clear();
224
224
  this.responseFilters_.clear();
225
+
226
+ // FakeEventTarget implements IReleasable
227
+ super.release();
228
+
225
229
  return this.operationManager_.destroy();
226
230
  }
227
231
 
@@ -417,7 +421,7 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
417
421
  }
418
422
 
419
423
  // Schemes are meant to be case-insensitive.
420
- // See https://github.com/google/shaka-player/issues/2173
424
+ // See https://github.com/shaka-project/shaka-player/issues/2173
421
425
  // and https://tools.ietf.org/html/rfc3986#section-3.1
422
426
  scheme = scheme.toLowerCase();
423
427
 
@@ -477,16 +477,15 @@ shaka.offline.Storage = class {
477
477
  * @private
478
478
  */
479
479
  async filterManifest_(manifest, drmEngine, config) {
480
- const StreamUtils = shaka.util.StreamUtils;
481
-
482
480
  // Filter the manifest based on the restrictions given in the player
483
481
  // configuration.
484
482
  const maxHwRes = {width: Infinity, height: Infinity};
485
- StreamUtils.filterByRestrictions(manifest, config.restrictions, maxHwRes);
483
+ shaka.util.StreamUtils.filterByRestrictions(
484
+ manifest, config.restrictions, maxHwRes);
486
485
 
487
486
  // Filter the manifest based on what we know MediaCapabilities will be able
488
487
  // to play later (no point storing something we can't play).
489
- StreamUtils.filterManifestByMediaCapabilities(
488
+ await shaka.util.StreamUtils.filterManifestByMediaCapabilities(
490
489
  manifest, config.offline.usePersistentLicense);
491
490
 
492
491
  // Gather all tracks.
@@ -498,24 +497,24 @@ shaka.offline.Storage = class {
498
497
  const preferredVideoCodecs = config.preferredVideoCodecs;
499
498
  const preferredAudioCodecs = config.preferredAudioCodecs;
500
499
 
501
- StreamUtils.chooseCodecsAndFilterManifest(
500
+ shaka.util.StreamUtils.chooseCodecsAndFilterManifest(
502
501
  manifest, preferredVideoCodecs, preferredAudioCodecs,
503
502
  preferredAudioChannelCount, preferredDecodingAttributes);
504
503
 
505
504
  for (const variant of manifest.variants) {
506
505
  goog.asserts.assert(
507
- StreamUtils.isPlayable(variant),
506
+ shaka.util.StreamUtils.isPlayable(variant),
508
507
  'We should have already filtered by "is playable"');
509
508
 
510
- allTracks.push(StreamUtils.variantToTrack(variant));
509
+ allTracks.push(shaka.util.StreamUtils.variantToTrack(variant));
511
510
  }
512
511
 
513
512
  for (const text of manifest.textStreams) {
514
- allTracks.push(StreamUtils.textStreamToTrack(text));
513
+ allTracks.push(shaka.util.StreamUtils.textStreamToTrack(text));
515
514
  }
516
515
 
517
516
  for (const image of manifest.imageStreams) {
518
- allTracks.push(StreamUtils.imageStreamToTrack(image));
517
+ allTracks.push(shaka.util.StreamUtils.imageStreamToTrack(image));
519
518
  }
520
519
 
521
520
  // Let the application choose which tracks to store.
@@ -599,10 +598,10 @@ shaka.offline.Storage = class {
599
598
  storage, drmEngine, manifest, uri, metadata, config, downloader) {
600
599
  const pendingContent = shaka.offline.StoredContentUtils.fromManifest(
601
600
  uri, manifest, /* size= */ 0, metadata);
602
- // In https://github.com/google/shaka-player/issues/2652, we found that this
603
- // callback would be removed by the compiler if we reference the config in
604
- // the onProgress closure below. Reading it into a local variable first
605
- // seems to work around this apparent compiler bug.
601
+ // In https://github.com/shaka-project/shaka-player/issues/2652, we found
602
+ // that this callback would be removed by the compiler if we reference the
603
+ // config in the onProgress closure below. Reading it into a local
604
+ // variable first seems to work around this apparent compiler bug.
606
605
  const progressCallback = config.offline.progressCallback;
607
606
 
608
607
  const onProgress = (progress, size) => {
package/lib/player.js CHANGED
@@ -728,6 +728,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
728
728
  await this.networkingEngine_.destroy();
729
729
  this.networkingEngine_ = null;
730
730
  }
731
+
732
+ // FakeEventTarget implements IReleasable
733
+ super.release();
731
734
  }
732
735
 
733
736
  /**
@@ -1611,8 +1614,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
1611
1614
  // initialize it now even through it appears a little out-of-place.
1612
1615
  this.regionTimeline_ =
1613
1616
  new shaka.media.RegionTimeline(() => this.seekRange());
1614
- this.regionTimeline_.setListeners(/* onRegionAdded= */ (region) => {
1617
+ this.regionTimeline_.addEventListener('regionadd', (event) => {
1618
+ /** @type {shaka.extern.TimelineRegionInfo} */
1619
+ const region = event['region'];
1615
1620
  this.onRegionEvent_(shaka.Player.EventName.TimelineRegionAdded, region);
1621
+
1616
1622
  if (this.adManager_) {
1617
1623
  this.adManager_.onDashTimedMetadata(region);
1618
1624
  }
@@ -2104,6 +2110,14 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2104
2110
 
2105
2111
  this.playhead_ = new shaka.media.SrcEqualsPlayhead(has.mediaElement);
2106
2112
 
2113
+ // This flag is used below in the language preference setup and
2114
+ // track-management to check if this load was canceled before the necessary
2115
+ // events fired.
2116
+ let unloaded = false;
2117
+ this.cleanupOnUnload_.push(() => {
2118
+ unloaded = true;
2119
+ });
2120
+
2107
2121
  if (has.startTime != null) {
2108
2122
  this.playhead_.setStartTime(has.startTime);
2109
2123
  }
@@ -2131,7 +2145,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2131
2145
 
2132
2146
  // Wait for the 'loadedmetadata' event to measure load() latency, but only
2133
2147
  // if preload is set in a way that would result in this event firing
2134
- // automatically. See https://github.com/google/shaka-player/issues/2483
2148
+ // automatically.
2149
+ // See https://github.com/shaka-project/shaka-player/issues/2483
2135
2150
  if (this.video_.preload != 'none') {
2136
2151
  this.eventManager_.listenOnce(this.video_, 'loadedmetadata', () => {
2137
2152
  const now = Date.now() / 1000;
@@ -2154,6 +2169,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2154
2169
  }
2155
2170
  if (this.video_.textTracks) {
2156
2171
  this.eventManager_.listen(this.video_.textTracks, 'addtrack', (e) => {
2172
+ // If we have moved on to another piece of content while waiting for
2173
+ // the above event, we should not process tracks here.
2174
+ if (unloaded) {
2175
+ return;
2176
+ }
2177
+
2157
2178
  const trackEvent = /** @type {!TrackEvent} */(e);
2158
2179
  if (trackEvent.track) {
2159
2180
  const track = trackEvent.track;
@@ -2209,13 +2230,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2209
2230
  fullyLoaded.resolve();
2210
2231
  });
2211
2232
 
2212
- // This flag is used below in the language preference setup to check if this
2213
- // load was canceled before the necessary events fire.
2214
- let unloaded = false;
2215
- this.cleanupOnUnload_.push(() => {
2216
- unloaded = true;
2217
- });
2218
-
2219
2233
  // We can't switch to preferred languages, though, until the data is loaded.
2220
2234
  shaka.util.MediaReadyState.waitForReadyState(this.video_,
2221
2235
  HTMLMediaElement.HAVE_CURRENT_DATA,
@@ -2370,12 +2384,16 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2370
2384
  // In Safari the initial assignment does not always work, so we schedule
2371
2385
  // this process to be repeated several times to ensure that it has been put
2372
2386
  // in the correct mode.
2373
- new shaka.util.Timer(() => {
2387
+ const timer = new shaka.util.Timer(() => {
2374
2388
  const textTracks = this.getMetadataTracks_();
2375
2389
  for (const textTrack of textTracks) {
2376
2390
  textTrack.mode = 'hidden';
2377
2391
  }
2378
- }).tickNow().tickAfter(/* seconds= */ 0.5);
2392
+ }).tickNow().tickAfter(0.5);
2393
+
2394
+ this.cleanupOnUnload_.push(() => {
2395
+ timer.stop();
2396
+ });
2379
2397
  }
2380
2398
 
2381
2399
 
@@ -2443,12 +2461,16 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2443
2461
  // In Safari the initial assignment does not always work, so we schedule
2444
2462
  // this process to be repeated several times to ensure that it has been put
2445
2463
  // in the correct mode.
2446
- new shaka.util.Timer(() => {
2464
+ const timer = new shaka.util.Timer(() => {
2447
2465
  const chaptersTracks = this.getChaptersTracks_();
2448
2466
  for (const chaptersTrack of chaptersTracks) {
2449
2467
  chaptersTrack.mode = 'hidden';
2450
2468
  }
2451
- }).tickNow().tickAfter(/* seconds= */ 0.5);
2469
+ }).tickNow().tickAfter(0.5);
2470
+
2471
+ this.cleanupOnUnload_.push(() => {
2472
+ timer.stop();
2473
+ });
2452
2474
  }
2453
2475
 
2454
2476
  /**
@@ -2547,21 +2569,31 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2547
2569
  // Create the region observer. This will allow us to notify the app when we
2548
2570
  // move in and out of timeline regions.
2549
2571
  const regionObserver = new shaka.media.RegionObserver(this.regionTimeline_);
2550
- const onEnterRegion = (region, seeking) => {
2572
+
2573
+ regionObserver.addEventListener('enter', (event) => {
2574
+ /** @type {shaka.extern.TimelineRegionInfo} */
2575
+ const region = event['region'];
2551
2576
  this.onRegionEvent_(shaka.Player.EventName.TimelineRegionEnter, region);
2552
- };
2553
- const onExitRegion = (region, seeking) => {
2577
+ });
2578
+
2579
+ regionObserver.addEventListener('exit', (event) => {
2580
+ /** @type {shaka.extern.TimelineRegionInfo} */
2581
+ const region = event['region'];
2554
2582
  this.onRegionEvent_(shaka.Player.EventName.TimelineRegionExit, region);
2555
- };
2556
- const onSkipRegion = (region, seeking) => {
2583
+ });
2584
+
2585
+ regionObserver.addEventListener('skip', (event) => {
2586
+ /** @type {shaka.extern.TimelineRegionInfo} */
2587
+ const region = event['region'];
2588
+ /** @type {boolean} */
2589
+ const seeking = event['seeking'];
2557
2590
  // If we are seeking, we don't want to surface the enter/exit events since
2558
2591
  // they didn't play through them.
2559
2592
  if (!seeking) {
2560
2593
  this.onRegionEvent_(shaka.Player.EventName.TimelineRegionEnter, region);
2561
2594
  this.onRegionEvent_(shaka.Player.EventName.TimelineRegionExit, region);
2562
2595
  }
2563
- };
2564
- regionObserver.setListeners(onEnterRegion, onExitRegion, onSkipRegion);
2596
+ });
2565
2597
 
2566
2598
  // Now that we have all our observers, create a manager for them.
2567
2599
  const manager = new shaka.media.PlayheadObserverManager(this.video_);
@@ -3524,7 +3556,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3524
3556
  this.streamingEngine_.switchTextStream(stream);
3525
3557
  this.onTextChanged_();
3526
3558
 
3527
- // Workaround for https://github.com/google/shaka-player/issues/1299
3559
+ // Workaround for
3560
+ // https://github.com/shaka-project/shaka-player/issues/1299
3528
3561
  // When track is selected, back-propagate the language to
3529
3562
  // currentTextLanguage_.
3530
3563
  this.currentTextLanguage_ = stream.language;
@@ -3600,7 +3633,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3600
3633
  this.switchVariant_(variant, /* fromAdaptation= */ false, clearBuffer,
3601
3634
  safeMargin);
3602
3635
 
3603
- // Workaround for https://github.com/google/shaka-player/issues/1299
3636
+ // Workaround for
3637
+ // https://github.com/shaka-project/shaka-player/issues/1299
3604
3638
  // When track is selected, back-propagate the language to
3605
3639
  // currentAudioLanguage_.
3606
3640
  this.currentAdaptationSetCriteria_ = new shaka.media.ExampleBasedCriteria(
@@ -5067,7 +5101,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
5067
5101
  // If the playback rate changes while seeking, Edge will cache the playback
5068
5102
  // rate and use it after seeking.
5069
5103
  //
5070
- // https://github.com/google/shaka-player/issues/951
5104
+ // https://github.com/shaka-project/shaka-player/issues/951
5071
5105
  if (newRate == 0) {
5072
5106
  return;
5073
5107
  }
@@ -6338,7 +6372,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
6338
6372
  * @define {string} A version number taken from git at compile time.
6339
6373
  * @export
6340
6374
  */
6341
- shaka.Player.version = 'v3.2.3-uncompiled';
6375
+ shaka.Player.version = 'v3.2.6-uncompiled';
6342
6376
 
6343
6377
  // Initialize the deprecation system using the version string we just set
6344
6378
  // on the player.
@@ -7,7 +7,6 @@
7
7
  goog.provide('shaka.polyfill');
8
8
 
9
9
  goog.require('shaka.log');
10
- goog.require('shaka.util.Iterables');
11
10
 
12
11
 
13
12
  /**
@@ -40,8 +39,8 @@ shaka.polyfill = class {
40
39
  */
41
40
  static register(polyfill, priority) {
42
41
  const newItem = {priority: priority || 0, callback: polyfill};
43
- const enumerate = (it) => shaka.util.Iterables.enumerate(it);
44
- for (const {i, item} of enumerate(shaka.polyfill.polyfills_)) {
42
+ for (let i = 0; i < shaka.polyfill.polyfills_.length; i++) {
43
+ const item = shaka.polyfill.polyfills_[i];
45
44
  if (item.priority < newItem.priority) {
46
45
  shaka.polyfill.polyfills_.splice(i, 0, newItem);
47
46
  return;
@@ -12,7 +12,7 @@ goog.require('shaka.polyfill');
12
12
  * @summary A polyfill to add support for EncryptionScheme queries in EME.
13
13
  * @see https://wicg.github.io/encrypted-media-encryption-scheme/
14
14
  * @see https://github.com/w3c/encrypted-media/pull/457
15
- * @see https://github.com/google/eme-encryption-scheme-polyfill
15
+ * @see https://github.com/shaka-project/eme-encryption-scheme-polyfill
16
16
  * @export
17
17
  */
18
18
  shaka.polyfill.EncryptionScheme = class {
@@ -29,12 +29,12 @@ shaka.polyfill.MediaCapabilities = class {
29
29
  // TODO: re-evaluate MediaCapabilities in the future versions of Chromecast.
30
30
  // Since MediaCapabilities implementation is buggy in Apple browsers, we
31
31
  // should always install polyfill for Apple browsers.
32
- // See: https://github.com/google/shaka-player/issues/3530
32
+ // See: https://github.com/shaka-project/shaka-player/issues/3530
33
33
  // TODO: re-evaluate MediaCapabilities in the future versions of Apple
34
34
  // Browsers.
35
35
  // Since MediaCapabilities implementation is buggy in PS5 browsers, we
36
36
  // should always install polyfill for PS5 browsers.
37
- // See: https://github.com/google/shaka-player/issues/3582
37
+ // See: https://github.com/shaka-project/shaka-player/issues/3582
38
38
  // TODO: re-evaluate MediaCapabilities in the future versions of PS5
39
39
  // Browsers.
40
40
  if (!shaka.util.Platform.isChromecast() &&
@@ -54,7 +54,7 @@ shaka.polyfill.MediaCapabilities = class {
54
54
 
55
55
  // Keep the patched MediaCapabilities object from being garbage-collected in
56
56
  // Safari.
57
- // See https://github.com/google/shaka-player/issues/3696#issuecomment-1009472718
57
+ // See https://github.com/shaka-project/shaka-player/issues/3696#issuecomment-1009472718
58
58
  shaka.polyfill.MediaCapabilities.originalMcap =
59
59
  navigator.mediaCapabilities;
60
60
 
@@ -39,7 +39,7 @@ shaka.polyfill.MediaSource = class {
39
39
  shaka.polyfill.MediaSource.patchCastIsTypeSupported_();
40
40
  } else if (safariVersion) {
41
41
  // TS content is broken on Safari in general.
42
- // See https://github.com/google/shaka-player/issues/743
42
+ // See https://github.com/shaka-project/shaka-player/issues/743
43
43
  // and https://bugs.webkit.org/show_bug.cgi?id=165342
44
44
  shaka.polyfill.MediaSource.rejectTsContent_();
45
45
 
package/lib/text/cue.js CHANGED
@@ -282,7 +282,7 @@ shaka.text.Cue = class {
282
282
  // Compare the start time, end time and payload of the cues first for
283
283
  // performance optimization. We can avoid the more expensive recursive
284
284
  // checks if the top-level properties don't match.
285
- // See: https://github.com/google/shaka-player/issues/3018
285
+ // See: https://github.com/shaka-project/shaka-player/issues/3018
286
286
  if (cue1.startTime != cue2.startTime || cue1.endTime != cue2.endTime ||
287
287
  cue1.payload != cue2.payload) {
288
288
  return false;
@@ -178,7 +178,8 @@ shaka.text.SimpleTextDisplayer = class {
178
178
  // The browser will display cues with identical time ranges from the
179
179
  // bottom up. Reversing the order of equal cues means the first one
180
180
  // parsed will be at the top, as you would expect.
181
- // See https://github.com/google/shaka-player/issues/848 for more info.
181
+ // See https://github.com/shaka-project/shaka-player/issues/848 for
182
+ // more info.
182
183
  // However, this ordering behavior is part of VTTCue's "line" field.
183
184
  // Some platforms don't have a real VTTCue and use a polyfill instead.
184
185
  // When VTTCue is polyfilled or does not support "line", we should _not_
@@ -536,8 +536,10 @@ shaka.text.TtmlTextParser = class {
536
536
 
537
537
  cue.textAlign = Cue.textAlign[align.toUpperCase()];
538
538
  } else {
539
- // Default value is START: https://bit.ly/32OGmvo
540
- cue.textAlign = Cue.textAlign.START;
539
+ // Default value is START in the TTML spec: https://bit.ly/32OGmvo
540
+ // But to make the subtitle render consitent with other players and the
541
+ // shaka.text.Cue we use CENTER
542
+ cue.textAlign = Cue.textAlign.CENTER;
541
543
  }
542
544
 
543
545
  const displayAlign = TtmlTextParser.getStyleAttribute_(
@@ -559,7 +561,7 @@ shaka.text.TtmlTextParser = class {
559
561
  // Background color should not be set on a container. If this is a nested
560
562
  // cue, you can set the background. If it's a top-level that happens to
561
563
  // also be a leaf, you can set the background.
562
- // See https://github.com/google/shaka-player/issues/2623
564
+ // See https://github.com/shaka-project/shaka-player/issues/2623
563
565
  // This used to be handled in the displayer, but that is confusing. The Cue
564
566
  // structure should reflect what you want to happen in the displayer, and
565
567
  // the displayer shouldn't have to know about TTML.
@@ -919,8 +921,9 @@ shaka.text.TtmlTextParser = class {
919
921
  let ret = null;
920
922
  const XmlUtils = shaka.util.XmlUtils;
921
923
  while (element) {
922
- ret = nsName ? XmlUtils.getAttributeNS(element, nsName, attributeName)
923
- : element.getAttribute(attributeName);
924
+ ret = nsName ?
925
+ XmlUtils.getAttributeNS(element, nsName, attributeName) :
926
+ element.getAttribute(attributeName);
924
927
  if (ret) {
925
928
  break;
926
929
  }
@@ -108,7 +108,7 @@ shaka.text.UITextDisplayer = class {
108
108
  append(cues) {
109
109
  // Clone the cues list for performace optimization. We can avoid the cues
110
110
  // list growing during the comparisons for duplicate cues.
111
- // See: https://github.com/google/shaka-player/issues/3018
111
+ // See: https://github.com/shaka-project/shaka-player/issues/3018
112
112
  const cuesList = [...this.cues_];
113
113
  for (const cue of cues) {
114
114
  // When a VTT cue spans a segment boundary, the cue will be duplicated
@@ -6,8 +6,6 @@
6
6
 
7
7
  goog.provide('shaka.util.BufferUtils');
8
8
 
9
- goog.require('shaka.util.Iterables');
10
-
11
9
 
12
10
  /**
13
11
  * @summary A set of BufferSource utility functions.
@@ -45,7 +43,7 @@ shaka.util.BufferUtils = class {
45
43
 
46
44
  const uint8A = shaka.util.BufferUtils.toUint8(arr1);
47
45
  const uint8B = shaka.util.BufferUtils.toUint8(arr2);
48
- for (const i of shaka.util.Iterables.range(arr1.byteLength)) {
46
+ for (let i = 0; i < arr1.byteLength; i++) {
49
47
  if (uint8A[i] != uint8B[i]) {
50
48
  return false;
51
49
  }
@@ -11,7 +11,6 @@ goog.require('goog.asserts');
11
11
  goog.require('shaka.util.BufferUtils');
12
12
  goog.require('shaka.util.DataViewReader');
13
13
  goog.require('shaka.util.Error');
14
- goog.require('shaka.util.Iterables');
15
14
 
16
15
 
17
16
  /**
@@ -157,7 +156,8 @@ shaka.util.EbmlParser = class {
157
156
  }
158
157
 
159
158
  let value = 0;
160
- for (const {item, i} of shaka.util.Iterables.enumerate(vint)) {
159
+ for (let i = 0; i < vint.length; i++) {
160
+ const item = vint[i];
161
161
  if (i == 0) {
162
162
  // Mask out the first few bits of |vint|'s first byte to get the most
163
163
  // significant bits of |vint|'s value. If |vint| is 8 bytes wide then
@@ -267,7 +267,7 @@ shaka.util.EbmlElement = class {
267
267
 
268
268
  let value = 0;
269
269
 
270
- for (const i of shaka.util.Iterables.range(this.dataView_.byteLength)) {
270
+ for (let i = 0; i < this.dataView_.byteLength; i++) {
271
271
  const chunk = this.dataView_.getUint8(i);
272
272
  value = (256 * value) + chunk;
273
273
  }
package/lib/util/error.js CHANGED
@@ -467,7 +467,7 @@ shaka.util.Error.Code = {
467
467
  * Content transformations required by the platform could not be performed for
468
468
  * some reason (unsupported container, etc.)
469
469
  *
470
- * @see https://github.com/google/shaka-player/issues/2759
470
+ * @see https://github.com/shaka-project/shaka-player/issues/2759
471
471
  */
472
472
  'CONTENT_TRANSFORMATION_FAILED': 3019,
473
473