shaka-player 4.9.13 → 4.9.14
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 +36 -36
- 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 +13 -13
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +29 -28
- 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 +17 -17
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +41 -40
- 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
|
@@ -1593,7 +1593,8 @@ shaka.extern.AdsConfiguration;
|
|
|
1593
1593
|
* ignoreDevicePixelRatio: boolean,
|
|
1594
1594
|
* clearBufferSwitch: boolean,
|
|
1595
1595
|
* safeMarginSwitch: number,
|
|
1596
|
-
* cacheLoadThreshold: number
|
|
1596
|
+
* cacheLoadThreshold: number,
|
|
1597
|
+
* minTimeToSwitch: number
|
|
1597
1598
|
* }}
|
|
1598
1599
|
*
|
|
1599
1600
|
* @property {boolean} enabled
|
|
@@ -1655,6 +1656,11 @@ shaka.extern.AdsConfiguration;
|
|
|
1655
1656
|
* Indicates the value in milliseconds from which a request is not
|
|
1656
1657
|
* considered cached.
|
|
1657
1658
|
* Defaults to <code>20</code>.
|
|
1659
|
+
* @property {number} minTimeToSwitch
|
|
1660
|
+
* Indicates the minimum time to change quality once the real bandwidth is
|
|
1661
|
+
* available, in seconds. This time is only used on the first load.
|
|
1662
|
+
* Defaults to <code>0</code> seconds except in Apple browsers whose default
|
|
1663
|
+
* value is <code>0.5</code> seconds.
|
|
1658
1664
|
* @exportDoc
|
|
1659
1665
|
*/
|
|
1660
1666
|
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
|
@@ -572,9 +572,10 @@ shaka.hls.HlsParser = class {
|
|
|
572
572
|
if (goog.DEBUG) {
|
|
573
573
|
const firstSequenceStartTime =
|
|
574
574
|
mediaSequenceToStartTime.values().next().value;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
if (firstSequenceStartTime != segment0.startTime) {
|
|
576
|
+
shaka.log.warning(
|
|
577
|
+
'Sequence number map is not ordered as expected!');
|
|
578
|
+
}
|
|
578
579
|
}
|
|
579
580
|
for (const [sequence, start] of mediaSequenceToStartTime) {
|
|
580
581
|
if (start == segment0.startTime) {
|
package/lib/player.js
CHANGED
|
@@ -6612,7 +6612,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6612
6612
|
// Check if we should show text (based on difference between audio and text
|
|
6613
6613
|
// languages).
|
|
6614
6614
|
if (initialTextStream) {
|
|
6615
|
-
if (
|
|
6615
|
+
if (this.shouldInitiallyShowText_(
|
|
6616
6616
|
initialVariant.audio, initialTextStream)) {
|
|
6617
6617
|
this.isTextVisible_ = true;
|
|
6618
6618
|
}
|
|
@@ -6632,7 +6632,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6632
6632
|
/**
|
|
6633
6633
|
* Check if we should show text on screen automatically.
|
|
6634
6634
|
*
|
|
6635
|
-
* @param {shaka.extern.Stream} audioStream
|
|
6635
|
+
* @param {?shaka.extern.Stream} audioStream
|
|
6636
6636
|
* @param {shaka.extern.Stream} textStream
|
|
6637
6637
|
* @return {boolean}
|
|
6638
6638
|
* @private
|
|
@@ -6663,6 +6663,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6663
6663
|
}
|
|
6664
6664
|
|
|
6665
6665
|
if (this.config_.autoShowText == AutoShowText.IF_SUBTITLES_MAY_BE_NEEDED) {
|
|
6666
|
+
if (!audioStream) {
|
|
6667
|
+
return false;
|
|
6668
|
+
}
|
|
6666
6669
|
/* The text should automatically be shown if the text is
|
|
6667
6670
|
* language-compatible with the user's text language preference, but not
|
|
6668
6671
|
* compatible with the audio. These are cases where we deduce that
|
|
@@ -7473,7 +7476,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
|
|
|
7473
7476
|
* @export
|
|
7474
7477
|
*/
|
|
7475
7478
|
// eslint-disable-next-line no-useless-concat
|
|
7476
|
-
shaka.Player.version = 'v4.9.
|
|
7479
|
+
shaka.Player.version = 'v4.9.14' + '-uncompiled'; // x-release-please-version
|
|
7477
7480
|
|
|
7478
7481
|
// Initialize the deprecation system using the version string we just set
|
|
7479
7482
|
// 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",
|