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.
- package/README.md +3 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.d.ts +4 -0
- package/dist/shaka-player.compiled.debug.d.ts +4 -0
- package/dist/shaka-player.compiled.debug.externs.js +5 -0
- package/dist/shaka-player.compiled.debug.js +314 -311
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +5 -0
- package/dist/shaka-player.compiled.js +1120 -1121
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +4 -0
- package/dist/shaka-player.ui.debug.d.ts +4 -0
- package/dist/shaka-player.ui.debug.externs.js +5 -0
- package/dist/shaka-player.ui.debug.js +339 -334
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +5 -0
- package/dist/shaka-player.ui.js +1207 -1208
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/client_side_ad.js +13 -2
- package/lib/ads/client_side_ad_manager.js +8 -5
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/cea_decoder.js +1 -1
- package/lib/dash/dash_parser.js +0 -1
- package/lib/hls/hls_parser.js +27 -2
- package/lib/media/media_source_engine.js +14 -9
- package/lib/media/presentation_timeline.js +11 -0
- package/lib/net/networking_utils.js +3 -1
- package/lib/offline/session_deleter.js +0 -8
- package/lib/player.js +12 -6
- package/lib/text/vtt_text_parser.js +5 -0
- package/lib/util/periods.js +284 -230
- package/package.json +1 -1
- package/ui/hidden_seek_button.js +5 -1
- package/ui/play_button.js +17 -0
- package/ui/small_play_button.js +2 -2
package/package.json
CHANGED
package/ui/hidden_seek_button.js
CHANGED
|
@@ -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, '
|
|
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.
|
package/ui/small_play_button.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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;
|