shaka-player 4.10.1 → 4.10.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.
- package/dist/locales.js +35 -35
- 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.js +14 -13
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +28 -27
- 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.js +18 -17
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +40 -39
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/player.js +7 -1
- package/lib/abr/simple_abr_manager.js +11 -8
- package/lib/hls/hls_parser.js +4 -3
- package/lib/player.js +6 -3
- package/lib/util/player_configuration.js +1 -0
- package/package.json +1 -1
- package/ui/locales/fr.json +1 -1
package/externs/shaka/player.js
CHANGED
|
@@ -1707,7 +1707,8 @@ shaka.extern.AdsConfiguration;
|
|
|
1707
1707
|
* ignoreDevicePixelRatio: boolean,
|
|
1708
1708
|
* clearBufferSwitch: boolean,
|
|
1709
1709
|
* safeMarginSwitch: number,
|
|
1710
|
-
* cacheLoadThreshold: number
|
|
1710
|
+
* cacheLoadThreshold: number,
|
|
1711
|
+
* minTimeToSwitch: number
|
|
1711
1712
|
* }}
|
|
1712
1713
|
*
|
|
1713
1714
|
* @property {boolean} enabled
|
|
@@ -1769,6 +1770,11 @@ shaka.extern.AdsConfiguration;
|
|
|
1769
1770
|
* Indicates the value in milliseconds from which a request is not
|
|
1770
1771
|
* considered cached.
|
|
1771
1772
|
* Defaults to <code>20</code>.
|
|
1773
|
+
* @property {number} minTimeToSwitch
|
|
1774
|
+
* Indicates the minimum time to change quality once the real bandwidth is
|
|
1775
|
+
* available, in seconds. This time is only used on the first load.
|
|
1776
|
+
* Defaults to <code>0</code> seconds except in Apple browsers whose default
|
|
1777
|
+
* value is <code>0.5</code> seconds.
|
|
1772
1778
|
* @exportDoc
|
|
1773
1779
|
*/
|
|
1774
1780
|
shaka.extern.AbrConfiguration;
|
|
@@ -433,14 +433,17 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
this.startupComplete_ = true;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
436
|
+
|
|
437
|
+
this.lastTimeChosenMs_ -=
|
|
438
|
+
(this.config_.switchInterval - this.config_.minTimeToSwitch) * 1000;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// Check if we've left the switch interval.
|
|
442
|
+
const now = Date.now();
|
|
443
|
+
const delta = now - this.lastTimeChosenMs_;
|
|
444
|
+
if (delta < this.config_.switchInterval * 1000) {
|
|
445
|
+
shaka.log.v2('Still within switch interval...');
|
|
446
|
+
return;
|
|
444
447
|
}
|
|
445
448
|
|
|
446
449
|
const chosenVariant = this.chooseVariant();
|
package/lib/hls/hls_parser.js
CHANGED
|
@@ -635,9 +635,10 @@ shaka.hls.HlsParser = class {
|
|
|
635
635
|
if (goog.DEBUG) {
|
|
636
636
|
const firstSequenceStartTime =
|
|
637
637
|
mediaSequenceToStartTime.values().next().value;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
638
|
+
if (firstSequenceStartTime != segment0.startTime) {
|
|
639
|
+
shaka.log.warning(
|
|
640
|
+
'Sequence number map is not ordered as expected!');
|
|
641
|
+
}
|
|
641
642
|
}
|
|
642
643
|
for (const [sequence, start] of mediaSequenceToStartTime) {
|
|
643
644
|
if (start == segment0.startTime) {
|
package/lib/player.js
CHANGED
|
@@ -6931,7 +6931,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6931
6931
|
// Check if we should show text (based on difference between audio and text
|
|
6932
6932
|
// languages).
|
|
6933
6933
|
if (initialTextStream) {
|
|
6934
|
-
if (
|
|
6934
|
+
if (this.shouldInitiallyShowText_(
|
|
6935
6935
|
initialVariant.audio, initialTextStream)) {
|
|
6936
6936
|
this.isTextVisible_ = true;
|
|
6937
6937
|
}
|
|
@@ -6951,7 +6951,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6951
6951
|
/**
|
|
6952
6952
|
* Check if we should show text on screen automatically.
|
|
6953
6953
|
*
|
|
6954
|
-
* @param {shaka.extern.Stream} audioStream
|
|
6954
|
+
* @param {?shaka.extern.Stream} audioStream
|
|
6955
6955
|
* @param {shaka.extern.Stream} textStream
|
|
6956
6956
|
* @return {boolean}
|
|
6957
6957
|
* @private
|
|
@@ -6982,6 +6982,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6982
6982
|
}
|
|
6983
6983
|
|
|
6984
6984
|
if (this.config_.autoShowText == AutoShowText.IF_SUBTITLES_MAY_BE_NEEDED) {
|
|
6985
|
+
if (!audioStream) {
|
|
6986
|
+
return false;
|
|
6987
|
+
}
|
|
6985
6988
|
/* The text should automatically be shown if the text is
|
|
6986
6989
|
* language-compatible with the user's text language preference, but not
|
|
6987
6990
|
* compatible with the audio. These are cases where we deduce that
|
|
@@ -7806,7 +7809,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
|
|
|
7806
7809
|
* @export
|
|
7807
7810
|
*/
|
|
7808
7811
|
// eslint-disable-next-line no-useless-concat
|
|
7809
|
-
shaka.Player.version = 'v4.10.
|
|
7812
|
+
shaka.Player.version = 'v4.10.2' + '-uncompiled'; // x-release-please-version
|
|
7810
7813
|
|
|
7811
7814
|
// Initialize the deprecation system using the version string we just set
|
|
7812
7815
|
// on the player.
|
package/package.json
CHANGED
package/ui/locales/fr.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"AD_DURATION": "Durée de l'annonce",
|
|
3
3
|
"AD_PROGRESS": "Annonce [AD_ON] sur [NUM_ADS]",
|
|
4
|
-
"AD_STATISTICS": "Statistiques de
|
|
4
|
+
"AD_STATISTICS": "Statistiques de l'annonce",
|
|
5
5
|
"AD_TIME": "Annonce : [AD_TIME]",
|
|
6
6
|
"AIRPLAY": "AirPlay",
|
|
7
7
|
"AUTO_QUALITY": "Automatique",
|