shaka-player 4.8.13 → 4.8.15
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 +51 -41
- package/dist/shaka-player.compiled.debug.js +11 -10
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +910 -910
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +22 -20
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +1112 -1112
- package/dist/shaka-player.ui.map +2 -2
- package/lib/media/time_ranges_utils.js +18 -10
- package/lib/net/http_fetch_plugin.js +2 -1
- package/lib/player.js +5 -1
- package/lib/text/mp4_ttml_parser.js +13 -0
- package/lib/text/ttml_text_parser.js +2 -2
- package/lib/util/manifest_parser_utils.js +1 -1
- package/package.json +1 -1
- package/ui/locales/pl.json +16 -7
|
@@ -11,6 +11,19 @@ goog.provide('shaka.media.TimeRangesUtils');
|
|
|
11
11
|
* @summary A set of utility functions for dealing with TimeRanges objects.
|
|
12
12
|
*/
|
|
13
13
|
shaka.media.TimeRangesUtils = class {
|
|
14
|
+
/**
|
|
15
|
+
* Returns whether the buffer is small enough to be ignored.
|
|
16
|
+
*
|
|
17
|
+
* @param {TimeRanges} b
|
|
18
|
+
* @return {boolean}
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
static isBufferNegligible_(b) {
|
|
22
|
+
// Workaround Safari bug: https://bit.ly/2trx6O8
|
|
23
|
+
// Firefox may leave <1e-4s of data in buffer after clearing all content
|
|
24
|
+
return b.length == 1 && b.end(0) - b.start(0) < 1e-4;
|
|
25
|
+
}
|
|
26
|
+
|
|
14
27
|
/**
|
|
15
28
|
* Gets the first timestamp in the buffer.
|
|
16
29
|
*
|
|
@@ -22,8 +35,7 @@ shaka.media.TimeRangesUtils = class {
|
|
|
22
35
|
if (!b) {
|
|
23
36
|
return null;
|
|
24
37
|
}
|
|
25
|
-
|
|
26
|
-
if (b.length == 1 && b.end(0) - b.start(0) < 1e-6) {
|
|
38
|
+
if (shaka.media.TimeRangesUtils.isBufferNegligible_(b)) {
|
|
27
39
|
return null;
|
|
28
40
|
}
|
|
29
41
|
// Workaround Edge bug: https://bit.ly/2JYLPeB
|
|
@@ -45,8 +57,7 @@ shaka.media.TimeRangesUtils = class {
|
|
|
45
57
|
if (!b) {
|
|
46
58
|
return null;
|
|
47
59
|
}
|
|
48
|
-
|
|
49
|
-
if (b.length == 1 && b.end(0) - b.start(0) < 1e-6) {
|
|
60
|
+
if (shaka.media.TimeRangesUtils.isBufferNegligible_(b)) {
|
|
50
61
|
return null;
|
|
51
62
|
}
|
|
52
63
|
return b.length ? b.end(b.length - 1) : null;
|
|
@@ -64,8 +75,7 @@ shaka.media.TimeRangesUtils = class {
|
|
|
64
75
|
if (!b || !b.length) {
|
|
65
76
|
return false;
|
|
66
77
|
}
|
|
67
|
-
|
|
68
|
-
if (b.length == 1 && b.end(0) - b.start(0) < 1e-6) {
|
|
78
|
+
if (shaka.media.TimeRangesUtils.isBufferNegligible_(b)) {
|
|
69
79
|
return false;
|
|
70
80
|
}
|
|
71
81
|
|
|
@@ -92,8 +102,7 @@ shaka.media.TimeRangesUtils = class {
|
|
|
92
102
|
if (!b || !b.length) {
|
|
93
103
|
return 0;
|
|
94
104
|
}
|
|
95
|
-
|
|
96
|
-
if (b.length == 1 && b.end(0) - b.start(0) < 1e-6) {
|
|
105
|
+
if (shaka.media.TimeRangesUtils.isBufferNegligible_(b)) {
|
|
97
106
|
return 0;
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -128,8 +137,7 @@ shaka.media.TimeRangesUtils = class {
|
|
|
128
137
|
if (!b || !b.length) {
|
|
129
138
|
return null;
|
|
130
139
|
}
|
|
131
|
-
|
|
132
|
-
if (b.length == 1 && b.end(0) - b.start(0) < 1e-6) {
|
|
140
|
+
if (shaka.media.TimeRangesUtils.isBufferNegligible_(b)) {
|
|
133
141
|
return null;
|
|
134
142
|
}
|
|
135
143
|
|
package/lib/player.js
CHANGED
|
@@ -6364,6 +6364,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
6364
6364
|
// This will reset the "enabled" of other tracks to false.
|
|
6365
6365
|
track.enabled = true;
|
|
6366
6366
|
|
|
6367
|
+
if (!currentTrack) {
|
|
6368
|
+
return;
|
|
6369
|
+
}
|
|
6370
|
+
|
|
6367
6371
|
// AirPlay does not reset the "enabled" of other tracks to false, so
|
|
6368
6372
|
// it must be changed by hand.
|
|
6369
6373
|
if (track.id !== currentTrack.id) {
|
|
@@ -7240,7 +7244,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
|
|
|
7240
7244
|
* @export
|
|
7241
7245
|
*/
|
|
7242
7246
|
// eslint-disable-next-line no-useless-concat
|
|
7243
|
-
shaka.Player.version = 'v4.8.
|
|
7247
|
+
shaka.Player.version = 'v4.8.15' + '-uncompiled'; // x-release-please-version
|
|
7244
7248
|
|
|
7245
7249
|
// Initialize the deprecation system using the version string we just set
|
|
7246
7250
|
// on the player.
|
|
@@ -110,6 +110,19 @@ shaka.text.TextEngine.registerParser(
|
|
|
110
110
|
shaka.text.TextEngine.registerParser(
|
|
111
111
|
'application/mp4; codecs="stpp.ttml.im1t"',
|
|
112
112
|
() => new shaka.text.Mp4TtmlParser());
|
|
113
|
+
shaka.text.TextEngine.registerParser(
|
|
114
|
+
'application/mp4; codecs="stpp.ttml.im2t"',
|
|
115
|
+
() => new shaka.text.Mp4TtmlParser());
|
|
116
|
+
shaka.text.TextEngine.registerParser(
|
|
117
|
+
'application/mp4; codecs="stpp.ttml.etd1"',
|
|
118
|
+
() => new shaka.text.Mp4TtmlParser());
|
|
119
|
+
shaka.text.TextEngine.registerParser(
|
|
120
|
+
'application/mp4; codecs="stpp.ttml.etd1|im1t"',
|
|
121
|
+
() => new shaka.text.Mp4TtmlParser());
|
|
122
|
+
shaka.text.TextEngine.registerParser(
|
|
123
|
+
'application/mp4; codecs="stpp.ttml.im1t|etd1"',
|
|
124
|
+
() => new shaka.text.Mp4TtmlParser());
|
|
125
|
+
|
|
113
126
|
// Legacy codec string uses capital "TTML", i.e.: prior to HLS rfc8216bis:
|
|
114
127
|
// Note that if a Variant Stream specifies one or more Renditions that
|
|
115
128
|
// include IMSC subtitles, the CODECS attribute MUST indicate this with a
|
|
@@ -1336,10 +1336,10 @@ shaka.text.TtmlTextParser.timeColonFormat_ = /^(?:(\d{2,}):)?(\d{2}):(\d{2})$/;
|
|
|
1336
1336
|
/**
|
|
1337
1337
|
* @const
|
|
1338
1338
|
* @private {!RegExp}
|
|
1339
|
-
* @example 01:02:43.0345555 or 02:43.03
|
|
1339
|
+
* @example 01:02:43.0345555 or 02:43.03 or 02:45.5
|
|
1340
1340
|
*/
|
|
1341
1341
|
shaka.text.TtmlTextParser.timeColonFormatMilliseconds_ =
|
|
1342
|
-
/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d
|
|
1342
|
+
/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/;
|
|
1343
1343
|
|
|
1344
1344
|
/**
|
|
1345
1345
|
* @const
|
|
@@ -295,7 +295,7 @@ shaka.util.ManifestParserUtils.AUDIO_CODEC_REGEXPS_ = [
|
|
|
295
295
|
/^flac$/, // some manifests wrongfully use this
|
|
296
296
|
/^mp4a/,
|
|
297
297
|
/^[ae]c-3$/,
|
|
298
|
-
/^ac-4
|
|
298
|
+
/^ac-4/,
|
|
299
299
|
/^dts[cex]$/, // DTS Digital Surround (dtsc), DTS Express (dtse), DTS:X (dtsx)
|
|
300
300
|
/^iamf/,
|
|
301
301
|
];
|
package/package.json
CHANGED
package/ui/locales/pl.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"AD_DURATION": "Czas trwania reklamy",
|
|
3
|
-
"AD_PROGRESS": "Reklama
|
|
3
|
+
"AD_PROGRESS": "Reklama [AD_ON] z [NUM_ADS]",
|
|
4
|
+
"AD_STATISTICS": "Statystyki reklam",
|
|
4
5
|
"AD_TIME": "Reklama: [AD_TIME]",
|
|
6
|
+
"AIRPLAY": "AirPlay",
|
|
5
7
|
"AUTO_QUALITY": "Automatycznie",
|
|
6
8
|
"BACK": "Wstecz",
|
|
7
9
|
"CAPTIONS": "Napisy",
|
|
8
10
|
"CAST": "Przesyłaj...",
|
|
9
|
-
"ENTER_LOOP_MODE": "Odtwarzaj bieżący film w
|
|
10
|
-
"ENTER_PICTURE_IN_PICTURE": "Włącz tryb obrazu w
|
|
11
|
+
"ENTER_LOOP_MODE": "Odtwarzaj bieżący film w pętli",
|
|
12
|
+
"ENTER_PICTURE_IN_PICTURE": "Włącz tryb obrazu w obrazie",
|
|
11
13
|
"EXIT_FULL_SCREEN": "Zamknij pełny ekran",
|
|
12
|
-
"EXIT_LOOP_MODE": "Wyłącz odtwarzanie bieżącego filmu w
|
|
13
|
-
"EXIT_PICTURE_IN_PICTURE": "Wyłącz tryb obrazu w
|
|
14
|
+
"EXIT_LOOP_MODE": "Wyłącz odtwarzanie bieżącego filmu w pętli",
|
|
15
|
+
"EXIT_PICTURE_IN_PICTURE": "Wyłącz tryb obrazu w obrazie",
|
|
14
16
|
"FAST_FORWARD": "Przewiń do przodu",
|
|
15
17
|
"FULL_SCREEN": "Pełny ekran",
|
|
16
18
|
"LANGUAGE": "Język",
|
|
17
19
|
"LIVE": "Na żywo",
|
|
18
|
-
"LOOP": "Odtwarzaj w
|
|
20
|
+
"LOOP": "Odtwarzaj w pętli",
|
|
19
21
|
"MORE_SETTINGS": "Więcej ustawień",
|
|
20
22
|
"MULTIPLE_LANGUAGES": "Wiele języków",
|
|
21
23
|
"MUTE": "Wycisz",
|
|
@@ -23,14 +25,21 @@
|
|
|
23
25
|
"OFF": "Wyłączone",
|
|
24
26
|
"ON": "Włączone",
|
|
25
27
|
"PAUSE": "Wstrzymaj",
|
|
26
|
-
"PICTURE_IN_PICTURE": "Obraz w
|
|
28
|
+
"PICTURE_IN_PICTURE": "Obraz w obrazie",
|
|
27
29
|
"PLAY": "Odtwórz",
|
|
28
30
|
"PLAYBACK_RATE": "Szybkość odtwarzania",
|
|
31
|
+
"QUALITY": "Jakość",
|
|
32
|
+
"RECENTER_VR": "Wycentruj",
|
|
33
|
+
"REPLAY": "Odtwórz od nowa",
|
|
29
34
|
"RESOLUTION": "Rozdzielczość",
|
|
30
35
|
"REWIND": "Przewiń do tyłu",
|
|
31
36
|
"SEEK": "Szukaj",
|
|
32
37
|
"SKIP_AD": "Pomiń reklamę",
|
|
33
38
|
"SKIP_TO_LIVE": "Przejdź do transmisji na żywo",
|
|
39
|
+
"STATISTICS": "Statystyki",
|
|
40
|
+
"SUBTITLE_FORCED": "Wymuszone",
|
|
41
|
+
"SURROUND": "Przestrzenny",
|
|
42
|
+
"TOGGLE_STEREOSCOPIC": "Przełącz widok stereoskopowy",
|
|
34
43
|
"UNDETERMINED_LANGUAGE": "Nie określono",
|
|
35
44
|
"UNMUTE": "Wyłącz wyciszenie",
|
|
36
45
|
"UNRECOGNIZED_LANGUAGE": "Nierozpoznany",
|