shaka-player 4.6.3 → 4.6.5

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/CHANGELOG.md +21 -0
  2. package/demo/common/asset.js +0 -1
  3. package/demo/common/assets.js +0 -1
  4. package/dist/demo.compiled.debug.map +1 -1
  5. package/dist/demo.compiled.map +1 -1
  6. package/dist/deps.js +5 -5
  7. package/dist/locales.js +33 -33
  8. package/dist/receiver.compiled.debug.map +1 -1
  9. package/dist/receiver.compiled.map +1 -1
  10. package/dist/shaka-player.compiled.d.ts +1 -1
  11. package/dist/shaka-player.compiled.debug.d.ts +1 -1
  12. package/dist/shaka-player.compiled.debug.externs.js +5 -2
  13. package/dist/shaka-player.compiled.debug.js +172 -171
  14. package/dist/shaka-player.compiled.debug.map +3 -3
  15. package/dist/shaka-player.compiled.externs.js +5 -2
  16. package/dist/shaka-player.compiled.js +227 -224
  17. package/dist/shaka-player.compiled.map +3 -3
  18. package/dist/shaka-player.ui.d.ts +1 -1
  19. package/dist/shaka-player.ui.debug.d.ts +1 -1
  20. package/dist/shaka-player.ui.debug.externs.js +5 -2
  21. package/dist/shaka-player.ui.debug.js +196 -195
  22. package/dist/shaka-player.ui.debug.map +3 -3
  23. package/dist/shaka-player.ui.externs.js +5 -2
  24. package/dist/shaka-player.ui.js +223 -220
  25. package/dist/shaka-player.ui.map +3 -3
  26. package/docs/tutorials/ui.md +3 -1
  27. package/lib/ads/client_side_ad_manager.js +4 -0
  28. package/lib/ads/media_tailor_ad_manager.js +5 -0
  29. package/lib/ads/server_side_ad_manager.js +4 -0
  30. package/lib/hls/hls_parser.js +17 -5
  31. package/lib/media/drm_engine.js +0 -3
  32. package/lib/media/media_source_engine.js +1 -1
  33. package/lib/media/streaming_engine.js +3 -2
  34. package/lib/media/video_wrapper.js +4 -3
  35. package/lib/net/networking_utils.js +12 -3
  36. package/lib/player.js +5 -7
  37. package/lib/text/simple_text_displayer.js +8 -7
  38. package/lib/text/text_utils.js +39 -13
  39. package/lib/text/ui_text_displayer.js +20 -11
  40. package/lib/text/web_vtt_generator.js +1 -1
  41. package/lib/util/ts_parser.js +12 -8
  42. package/package.json +1 -1
  43. package/test/media/drm_engine_unit.js +27 -0
  44. package/test/player_unit.js +31 -0
  45. package/test/test/util/layout_tests.js +2 -1
  46. package/test/text/simple_text_displayer_unit.js +1 -1
  47. package/test/text/web_vtt_generator_unit.js +3 -3
  48. package/test/transmuxer/transmuxer_integration.js +3 -3
  49. package/ui/volume_bar.js +10 -6
@@ -15,7 +15,7 @@
15
15
  function checkNoBrokenEdge() {
16
16
  const chromeVersion = shaka.util.Platform.chromeVersion();
17
17
  if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
18
- chromeVersion && chromeVersion <= 118) {
18
+ chromeVersion && chromeVersion <= 122) {
19
19
  // When the tests fail, it's due to the manifest parser failing to find a
20
20
  // factory. Attempt to find a factory first, to avoid filtering the tests
21
21
  // when running in a non-broken Edge environment.
@@ -66,7 +66,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
66
66
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1450313
67
67
  const chromeVersion = shaka.util.Platform.chromeVersion();
68
68
  if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
69
- chromeVersion && chromeVersion <= 118) {
69
+ chromeVersion && chromeVersion <= 122) {
70
70
  return false;
71
71
  }
72
72
  return true;
@@ -87,7 +87,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
87
87
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1450313
88
88
  const chromeVersion = shaka.util.Platform.chromeVersion();
89
89
  if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
90
- chromeVersion && chromeVersion <= 118) {
90
+ chromeVersion && chromeVersion <= 122) {
91
91
  return false;
92
92
  }
93
93
  return true;
package/ui/volume_bar.js CHANGED
@@ -32,6 +32,10 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
32
32
  /** @private {!shaka.extern.UIConfiguration} */
33
33
  this.config_ = this.controls.getConfig();
34
34
 
35
+ // We use a range of 100 to avoid problems with Firefox.
36
+ // See https://github.com/shaka-project/shaka-player/issues/3987
37
+ this.setRange(0, 100);
38
+
35
39
  this.eventManager.listen(this.video,
36
40
  'volumechange',
37
41
  () => this.onPresentationVolumeChange_());
@@ -74,9 +78,9 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
74
78
  */
75
79
  onChange() {
76
80
  if (this.ad && this.ad.isLinear()) {
77
- this.ad.setVolume(this.getValue());
81
+ this.ad.setVolume(this.getValue() / 100);
78
82
  } else {
79
- this.video.volume = this.getValue();
83
+ this.video.volume = this.getValue() / 100;
80
84
  if (this.video.volume == 0) {
81
85
  this.video.muted = true;
82
86
  } else {
@@ -90,7 +94,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
90
94
  if (this.video.muted) {
91
95
  this.setValue(0);
92
96
  } else {
93
- this.setValue(this.video.volume);
97
+ this.setValue(this.video.volume * 100);
94
98
  }
95
99
 
96
100
  this.updateColors_();
@@ -102,7 +106,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
102
106
  'This.ad should exist at this point!');
103
107
 
104
108
  const volume = this.ad.getVolume();
105
- this.setValue(volume);
109
+ this.setValue(volume * 100);
106
110
  this.updateColors_();
107
111
  }
108
112
 
@@ -110,8 +114,8 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
110
114
  updateColors_() {
111
115
  const colors = this.config_.volumeBarColors;
112
116
  const gradient = ['to right'];
113
- gradient.push(colors.level + (this.getValue() * 100) + '%');
114
- gradient.push(colors.base + (this.getValue() * 100) + '%');
117
+ gradient.push(colors.level + this.getValue() + '%');
118
+ gradient.push(colors.base + this.getValue() + '%');
115
119
  gradient.push(colors.base + '100%');
116
120
 
117
121
  this.container.style.background =