shaka-player 3.3.1 → 3.3.2

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 (49) 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 +4 -4
  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 +17 -12
  12. package/dist/shaka-player.compiled.debug.js +93 -90
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +17 -12
  15. package/dist/shaka-player.compiled.js +687 -686
  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 +107 -105
  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 +952 -952
  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/quality_observer.js +17 -34
  32. package/lib/media/region_observer.js +39 -33
  33. package/lib/media/region_timeline.js +17 -19
  34. package/lib/media/streaming_engine.js +1 -1
  35. package/lib/net/networking_engine.js +4 -0
  36. package/lib/offline/storage.js +8 -9
  37. package/lib/player.js +32 -10
  38. package/lib/util/fake_event_target.js +21 -1
  39. package/package.json +3 -6
  40. package/test/dash/dash_parser_live_unit.js +43 -0
  41. package/test/dash/dash_parser_manifest_unit.js +2 -1
  42. package/test/hls/hls_parser_unit.js +74 -0
  43. package/test/media/quality_observer_unit.js +4 -1
  44. package/test/media/region_observer_unit.js +40 -5
  45. package/test/media/region_timeline_unit.js +40 -22
  46. package/test/test/util/util.js +10 -7
  47. package/test/ui/text_displayer_layout_unit.js +8 -7
  48. package/ui/controls.js +3 -0
  49. package/ui/localization.js +12 -36
@@ -50,11 +50,24 @@ shaka.util.FakeEvent = class {
50
50
  */
51
51
  constructor(type, dict) {}
52
52
  };
53
+ /**
54
+ * An interface to standardize how objects release internal references
55
+ * synchronously. If an object needs to asynchronously release references, then
56
+ * it should use 'shaka.util.IDestroyable'.
57
+ * @interface
58
+ */
59
+ shaka.util.IReleasable = class {
60
+ /**
61
+ * Request that this object release all internal references.
62
+ */
63
+ release() {}
64
+ };
53
65
  /**
54
66
  * @summary A work-alike for EventTarget. Only DOM elements may be true
55
67
  * EventTargets, but this can be used as a base class to provide event dispatch
56
68
  * to non-DOM classes. Only FakeEvents should be dispatched.
57
69
  * @implements {EventTarget}
70
+ * @implements {shaka.util.IReleasable}
58
71
  */
59
72
  shaka.util.FakeEventTarget = class {
60
73
  /** */
@@ -92,6 +105,10 @@ shaka.util.FakeEventTarget = class {
92
105
  * @override
93
106
  */
94
107
  dispatchEvent(event) {}
108
+ /**
109
+ * @override
110
+ */
111
+ release() {}
95
112
  };
96
113
  /**
97
114
  * These are the listener types defined in the closure extern for EventTarget.
@@ -445,10 +462,9 @@ shaka.util.LanguageUtils = class {
445
462
  * strings that are expected to be displayed to the user.
446
463
  * If a string is not available, it will return the localized
447
464
  * form in the closest related locale.
448
- * @implements {EventTarget}
449
465
  * @final
450
466
  */
451
- shaka.ui.Localization = class {
467
+ shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
452
468
  /**
453
469
  * @param {string} fallbackLocale
454
470
  * The fallback locale that should be used. It will be assumed that this
@@ -458,15 +474,7 @@ shaka.ui.Localization = class {
458
474
  /**
459
475
  * @override
460
476
  */
461
- addEventListener(type, listener, options) {}
462
- /**
463
- * @override
464
- */
465
- removeEventListener(type, listener, options) {}
466
- /**
467
- * @override
468
- */
469
- dispatchEvent(event) {}
477
+ release() {}
470
478
  /**
471
479
  * Request the localization system to change which locale it serves. If any of
472
480
  * of the preferred locales cannot be found, the localization system will fire
@@ -1460,18 +1468,6 @@ shaka.net.NetworkingEngine.OnHeadersReceived;
1460
1468
  * reason (e.g. even if the download was aborted).
1461
1469
  */
1462
1470
  shaka.net.NetworkingEngine.OnDownloadFailed;
1463
- /**
1464
- * An interface to standardize how objects release internal references
1465
- * synchronously. If an object needs to asynchronously release references, then
1466
- * it should use 'shaka.util.IDestroyable'.
1467
- * @interface
1468
- */
1469
- shaka.util.IReleasable = class {
1470
- /**
1471
- * Request that this object release all internal references.
1472
- */
1473
- release() {}
1474
- };
1475
1471
  /**
1476
1472
  * @summary
1477
1473
  * An EventManager maintains a collection of "event