shaka-player 4.11.12 → 4.11.13
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/dist/deps.js +1 -1
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.externs.js +1 -1
- package/dist/shaka-player.compiled.debug.js +19 -19
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.externs.js +1 -1
- package/dist/shaka-player.compiled.js +67 -66
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -1
- package/dist/shaka-player.ui.debug.d.ts +1 -1
- package/dist/shaka-player.ui.debug.externs.js +1 -1
- package/dist/shaka-player.ui.debug.js +24 -24
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.externs.js +1 -1
- package/dist/shaka-player.ui.js +284 -283
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/interstitial_ad_manager.js +4 -3
- package/lib/net/networking_engine.js +3 -3
- package/lib/player.js +12 -2
- package/lib/text/ui_text_displayer.js +8 -0
- package/lib/util/error.js +1 -1
- package/package.json +1 -1
- package/ui/playback_rate_selection.js +6 -2
|
@@ -322,7 +322,7 @@ shaka.ads.InterstitialAdManager = class {
|
|
|
322
322
|
const interstitial = {
|
|
323
323
|
id: null,
|
|
324
324
|
startTime: region.startTime,
|
|
325
|
-
endTime:
|
|
325
|
+
endTime: region.endTime,
|
|
326
326
|
uri: alternativeMPDUri,
|
|
327
327
|
isSkippable: false,
|
|
328
328
|
skipOffset: null,
|
|
@@ -461,8 +461,7 @@ shaka.ads.InterstitialAdManager = class {
|
|
|
461
461
|
this.lastTime_ - roundDecimals(interstitial.startTime);
|
|
462
462
|
if (difference > 0 &&
|
|
463
463
|
(difference <= 1 || !interstitial.canJump)) {
|
|
464
|
-
if (
|
|
465
|
-
!lastPlayedAd.pre && !lastPlayedAd.post &&
|
|
464
|
+
if (lastPlayedAd && !lastPlayedAd.pre && !lastPlayedAd.post &&
|
|
466
465
|
lastPlayedAd.startTime >= interstitial.startTime) {
|
|
467
466
|
isValid = false;
|
|
468
467
|
} else {
|
|
@@ -620,6 +619,8 @@ shaka.ads.InterstitialAdManager = class {
|
|
|
620
619
|
if (!this.baseVideo_.ended) {
|
|
621
620
|
this.baseVideo_.play();
|
|
622
621
|
}
|
|
622
|
+
} else {
|
|
623
|
+
this.cuepointsChanged_();
|
|
623
624
|
}
|
|
624
625
|
this.determineIfUsingBaseVideo_();
|
|
625
626
|
}
|
|
@@ -576,12 +576,12 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
|
576
576
|
}
|
|
577
577
|
};
|
|
578
578
|
const headersReceived = (headers) => {
|
|
579
|
-
if (this.onHeadersReceived_) {
|
|
580
|
-
this.onHeadersReceived_(headers, request, type);
|
|
581
|
-
}
|
|
582
579
|
headersReceivedCalled = true;
|
|
583
580
|
request.timeToFirstByte = Date.now() -
|
|
584
581
|
/** @type {number} */ (request.requestStartTime);
|
|
582
|
+
if (this.onHeadersReceived_) {
|
|
583
|
+
this.onHeadersReceived_(headers, request, type);
|
|
584
|
+
}
|
|
585
585
|
};
|
|
586
586
|
request.requestStartTime = Date.now();
|
|
587
587
|
|
package/lib/player.js
CHANGED
|
@@ -6379,7 +6379,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6379
6379
|
// Because this.video_ may not be set when the config is built, the default
|
|
6380
6380
|
// TextDisplay factory must capture a reference to "this".
|
|
6381
6381
|
config.textDisplayFactory = () => {
|
|
6382
|
-
|
|
6382
|
+
// On iOS where the Fullscreen API is not available we prefer
|
|
6383
|
+
// SimpleTextDisplayer because it works with the Fullscreen API of the
|
|
6384
|
+
// video element itself.
|
|
6385
|
+
const Platform = shaka.util.Platform;
|
|
6386
|
+
if (this.videoContainer_ &&
|
|
6387
|
+
(!Platform.safariVersion() || document.fullscreenEnabled)) {
|
|
6383
6388
|
const latestConfig = this.getConfiguration();
|
|
6384
6389
|
return new shaka.text.UITextDisplayer(
|
|
6385
6390
|
this.video_, this.videoContainer_, latestConfig.textDisplayer);
|
|
@@ -6734,6 +6739,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6734
6739
|
return;
|
|
6735
6740
|
}
|
|
6736
6741
|
|
|
6742
|
+
// We don't want to block the user from pausing the stream.
|
|
6743
|
+
if (this.video_.paused) {
|
|
6744
|
+
return;
|
|
6745
|
+
}
|
|
6746
|
+
|
|
6737
6747
|
let targetLatency;
|
|
6738
6748
|
let maxLatency;
|
|
6739
6749
|
let maxPlaybackRate;
|
|
@@ -8113,7 +8123,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
|
|
|
8113
8123
|
* @export
|
|
8114
8124
|
*/
|
|
8115
8125
|
// eslint-disable-next-line no-useless-concat, max-len
|
|
8116
|
-
shaka.Player.version = 'v4.11.
|
|
8126
|
+
shaka.Player.version = 'v4.11.13' + '-uncompiled'; // x-release-please-version
|
|
8117
8127
|
|
|
8118
8128
|
// Initialize the deprecation system using the version string we just set
|
|
8119
8129
|
// on the player.
|
|
@@ -9,6 +9,7 @@ goog.provide('shaka.text.UITextDisplayer');
|
|
|
9
9
|
|
|
10
10
|
goog.require('goog.asserts');
|
|
11
11
|
goog.require('shaka.Deprecate');
|
|
12
|
+
goog.require('shaka.log');
|
|
12
13
|
goog.require('shaka.text.Cue');
|
|
13
14
|
goog.require('shaka.text.CueRegion');
|
|
14
15
|
goog.require('shaka.text.Utils');
|
|
@@ -35,6 +36,12 @@ shaka.text.UITextDisplayer = class {
|
|
|
35
36
|
constructor(video, videoContainer, config) {
|
|
36
37
|
goog.asserts.assert(videoContainer, 'videoContainer should be valid.');
|
|
37
38
|
|
|
39
|
+
if (!document.fullscreenEnabled) {
|
|
40
|
+
shaka.log.alwaysWarn('Using UITextDisplayer in a browser without ' +
|
|
41
|
+
'Fullscreen API support causes subtitles to not be rendered in ' +
|
|
42
|
+
'fullscreen');
|
|
43
|
+
}
|
|
44
|
+
|
|
38
45
|
/** @private {boolean} */
|
|
39
46
|
this.isTextVisible_ = false;
|
|
40
47
|
|
|
@@ -248,6 +255,7 @@ shaka.text.UITextDisplayer = class {
|
|
|
248
255
|
*/
|
|
249
256
|
setTextVisibility(on) {
|
|
250
257
|
this.isTextVisible_ = on;
|
|
258
|
+
this.updateCaptions_(/* forceUpdate= */ true);
|
|
251
259
|
}
|
|
252
260
|
|
|
253
261
|
/**
|
package/lib/util/error.js
CHANGED
package/package.json
CHANGED
|
@@ -120,8 +120,12 @@ shaka.ui.PlaybackRateSelection = class extends shaka.ui.SettingsMenu {
|
|
|
120
120
|
button.appendChild(span);
|
|
121
121
|
|
|
122
122
|
this.eventManager.listen(button, 'click', () => {
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
const rate = this.playbackRates_.get(rateStr);
|
|
124
|
+
if (rate == 1) {
|
|
125
|
+
this.player.cancelTrickPlay();
|
|
126
|
+
} else {
|
|
127
|
+
this.player.trickPlay(rate, /* useTrickPlayTrack= */ false);
|
|
128
|
+
}
|
|
125
129
|
});
|
|
126
130
|
|
|
127
131
|
this.menu.appendChild(button);
|