shaka-player 3.1.5 → 3.1.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 (47) hide show
  1. package/.github/workflows/build_and_test.yaml +73 -0
  2. package/.github/workflows/release.yaml +53 -0
  3. package/CHANGELOG.md +13 -1
  4. package/build/checkversion.py +1 -1
  5. package/build/test.py +6 -0
  6. package/dist/controls.css +1 -1
  7. package/dist/deps.js +3 -3
  8. package/dist/locales.js +29 -29
  9. package/dist/shaka-player.compiled.d.ts +2 -1
  10. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  11. package/dist/shaka-player.compiled.debug.externs.js +5 -0
  12. package/dist/shaka-player.compiled.debug.js +200 -198
  13. package/dist/shaka-player.compiled.debug.map +3 -3
  14. package/dist/shaka-player.compiled.externs.js +5 -0
  15. package/dist/shaka-player.compiled.js +609 -608
  16. package/dist/shaka-player.compiled.map +3 -3
  17. package/dist/shaka-player.ui.d.ts +4 -12
  18. package/dist/shaka-player.ui.debug.d.ts +4 -12
  19. package/dist/shaka-player.ui.debug.externs.js +19 -23
  20. package/dist/shaka-player.ui.debug.js +77 -76
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +19 -23
  23. package/dist/shaka-player.ui.js +901 -901
  24. package/dist/shaka-player.ui.map +2 -2
  25. package/karma.conf.js +19 -15
  26. package/lib/ads/ad_manager.js +1 -0
  27. package/lib/cast/cast_proxy.js +3 -0
  28. package/lib/cast/cast_receiver.js +3 -0
  29. package/lib/dash/dash_parser.js +31 -19
  30. package/lib/hls/manifest_text_parser.js +1 -0
  31. package/lib/media/region_observer.js +39 -33
  32. package/lib/media/region_timeline.js +17 -19
  33. package/lib/media/streaming_engine.js +1 -1
  34. package/lib/net/networking_engine.js +4 -0
  35. package/lib/offline/storage.js +10 -11
  36. package/lib/player.js +25 -9
  37. package/lib/util/fake_event_target.js +21 -1
  38. package/package.json +3 -6
  39. package/test/dash/dash_parser_live_unit.js +43 -0
  40. package/test/dash/dash_parser_manifest_unit.js +2 -1
  41. package/test/hls/hls_parser_unit.js +74 -0
  42. package/test/media/region_observer_unit.js +40 -5
  43. package/test/media/region_timeline_unit.js +40 -22
  44. package/test/test/util/util.js +10 -7
  45. package/test/ui/text_displayer_layout_unit.js +8 -7
  46. package/ui/controls.js +3 -0
  47. package/ui/localization.js +12 -36
@@ -48,11 +48,24 @@ shaka.util.FakeEvent = class {
48
48
  */
49
49
  constructor(type, dict) {}
50
50
  };
51
+ /**
52
+ * An interface to standardize how objects release internal references
53
+ * synchronously. If an object needs to asynchronously release references, then
54
+ * it should use 'shaka.util.IDestroyable'.
55
+ * @interface
56
+ */
57
+ shaka.util.IReleasable = class {
58
+ /**
59
+ * Request that this object release all internal references.
60
+ */
61
+ release() {}
62
+ };
51
63
  /**
52
64
  * @summary A work-alike for EventTarget. Only DOM elements may be true
53
65
  * EventTargets, but this can be used as a base class to provide event dispatch
54
66
  * to non-DOM classes. Only FakeEvents should be dispatched.
55
67
  * @implements {EventTarget}
68
+ * @implements {shaka.util.IReleasable}
56
69
  */
57
70
  shaka.util.FakeEventTarget = class {
58
71
  /** */
@@ -90,6 +103,10 @@ shaka.util.FakeEventTarget = class {
90
103
  * @override
91
104
  */
92
105
  dispatchEvent(event) {}
106
+ /**
107
+ * @override
108
+ */
109
+ release() {}
93
110
  };
94
111
  /**
95
112
  * These are the listener types defined in the closure extern for EventTarget.
@@ -298,10 +315,9 @@ shaka.util.Error.Code = {
298
315
  * strings that are expected to be displayed to the user.
299
316
  * If a string is not available, it will return the localized
300
317
  * form in the closest related locale.
301
- * @implements {EventTarget}
302
318
  * @final
303
319
  */
304
- shaka.ui.Localization = class {
320
+ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
305
321
  /**
306
322
  * @param {string} fallbackLocale
307
323
  * The fallback locale that should be used. It will be assumed that this
@@ -311,15 +327,7 @@ shaka.ui.Localization = class {
311
327
  /**
312
328
  * @override
313
329
  */
314
- addEventListener(type, listener, options) {}
315
- /**
316
- * @override
317
- */
318
- removeEventListener(type, listener, options) {}
319
- /**
320
- * @override
321
- */
322
- dispatchEvent(event) {}
330
+ release() {}
323
331
  /**
324
332
  * Request the localization system to change which locale it serves. If any of
325
333
  * of the preferred locales cannot be found, the localization system will fire
@@ -1150,18 +1158,6 @@ shaka.text.TextEngine = class {
1150
1158
  */
1151
1159
  destroy() {}
1152
1160
  };
1153
- /**
1154
- * An interface to standardize how objects release internal references
1155
- * synchronously. If an object needs to asynchronously release references, then
1156
- * it should use 'shaka.util.IDestroyable'.
1157
- * @interface
1158
- */
1159
- shaka.util.IReleasable = class {
1160
- /**
1161
- * Request that this object release all internal references.
1162
- */
1163
- release() {}
1164
- };
1165
1161
  /**
1166
1162
  * @summary
1167
1163
  * An EventManager maintains a collection of "event