shaka-player 4.7.2 → 4.7.4

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 (36) hide show
  1. package/README.md +3 -1
  2. package/dist/deps.js +1 -1
  3. package/dist/locales.js +31 -31
  4. package/dist/shaka-player.compiled.d.ts +4 -0
  5. package/dist/shaka-player.compiled.debug.d.ts +4 -0
  6. package/dist/shaka-player.compiled.debug.externs.js +5 -0
  7. package/dist/shaka-player.compiled.debug.js +314 -311
  8. package/dist/shaka-player.compiled.debug.map +3 -3
  9. package/dist/shaka-player.compiled.externs.js +5 -0
  10. package/dist/shaka-player.compiled.js +1120 -1121
  11. package/dist/shaka-player.compiled.map +3 -3
  12. package/dist/shaka-player.ui.d.ts +4 -0
  13. package/dist/shaka-player.ui.debug.d.ts +4 -0
  14. package/dist/shaka-player.ui.debug.externs.js +5 -0
  15. package/dist/shaka-player.ui.debug.js +339 -334
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.externs.js +5 -0
  18. package/dist/shaka-player.ui.js +1207 -1208
  19. package/dist/shaka-player.ui.map +3 -3
  20. package/lib/ads/client_side_ad.js +13 -2
  21. package/lib/ads/client_side_ad_manager.js +8 -5
  22. package/lib/cea/cea608_memory.js +1 -1
  23. package/lib/cea/cea_decoder.js +1 -1
  24. package/lib/dash/dash_parser.js +0 -1
  25. package/lib/hls/hls_parser.js +27 -2
  26. package/lib/media/media_source_engine.js +14 -9
  27. package/lib/media/presentation_timeline.js +11 -0
  28. package/lib/net/networking_utils.js +3 -1
  29. package/lib/offline/session_deleter.js +0 -8
  30. package/lib/player.js +12 -6
  31. package/lib/text/vtt_text_parser.js +5 -0
  32. package/lib/util/periods.js +284 -230
  33. package/package.json +1 -1
  34. package/ui/hidden_seek_button.js +5 -1
  35. package/ui/play_button.js +17 -0
  36. package/ui/small_play_button.js +2 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shaka-player",
3
3
  "description": "DASH/EME video player library",
4
- "version": "4.7.2",
4
+ "version": "4.7.4",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -44,7 +44,11 @@ shaka.ui.HiddenSeekButton = class extends shaka.ui.Element {
44
44
  this.seekContainer = shaka.util.Dom.createHTMLElement('div');
45
45
  this.parent.appendChild(this.seekContainer);
46
46
 
47
- this.eventManager.listen(this.seekContainer, 'touchstart', (event) => {
47
+ this.eventManager.listen(this.seekContainer, 'touchend', (event) => {
48
+ // Do nothing if the controls are not visible
49
+ if (!this.controls.isOpaque()) {
50
+ return;
51
+ }
48
52
  // In case any settings menu are open this assigns the first touch
49
53
  // to close the menu.
50
54
  if (this.controls.anySettingsMenusAreOpen()) {
package/ui/play_button.js CHANGED
@@ -72,6 +72,11 @@ shaka.ui.PlayButton = class extends shaka.ui.Element {
72
72
  this.updateIcon();
73
73
  });
74
74
 
75
+ this.eventManager.listen(this.adManager, AdManager.AD_STOPPED, () => {
76
+ this.updateAriaLabel();
77
+ this.updateIcon();
78
+ });
79
+
75
80
  this.eventManager.listen(this.button, 'click', () => {
76
81
  if (this.ad && this.ad.isLinear()) {
77
82
  this.controls.playPauseAd();
@@ -99,6 +104,18 @@ shaka.ui.PlayButton = class extends shaka.ui.Element {
99
104
  return this.controls.presentationIsPaused();
100
105
  }
101
106
 
107
+ /**
108
+ * @return {boolean}
109
+ * @protected
110
+ */
111
+ isEnded() {
112
+ if (this.ad && this.ad.isLinear()) {
113
+ return false;
114
+ }
115
+
116
+ return this.video.ended;
117
+ }
118
+
102
119
  /**
103
120
  * Called when the button's aria label needs to change.
104
121
  * To be overridden by subclasses.
@@ -38,7 +38,7 @@ shaka.ui.SmallPlayButton = class extends shaka.ui.PlayButton {
38
38
  /** @override */
39
39
  updateIcon() {
40
40
  const Icons = shaka.ui.Enums.MaterialDesignIcons;
41
- if (this.video.ended) {
41
+ if (this.isEnded()) {
42
42
  this.button.textContent = Icons.REPLAY;
43
43
  } else {
44
44
  this.button.textContent = this.isPaused() ? Icons.PLAY : Icons.PAUSE;
@@ -48,7 +48,7 @@ shaka.ui.SmallPlayButton = class extends shaka.ui.PlayButton {
48
48
  /** @override */
49
49
  updateAriaLabel() {
50
50
  const LocIds = shaka.ui.Locales.Ids;
51
- if (this.video.ended) {
51
+ if (this.isEnded()) {
52
52
  this.button.ariaLabel = this.localization.resolve(LocIds.REPLAY);
53
53
  } else {
54
54
  const label = this.isPaused() ? LocIds.PLAY : LocIds.PAUSE;