shaka-player 4.6.13 → 4.6.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/.github/workflows/shaka-bot-commands/lib.sh +37 -12
- package/.github/workflows/shaka-bot-commands/main.sh +4 -2
- package/.github/workflows/talk-to-shaka-bot.yaml +1 -0
- package/AUTHORS +1 -0
- package/CHANGELOG.md +26 -0
- package/CONTRIBUTORS +1 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.debug.js +91 -89
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +348 -349
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +105 -103
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +433 -434
- package/dist/shaka-player.ui.map +3 -3
- package/lib/ads/ad_manager.js +1 -1
- package/lib/dash/segment_template.js +18 -13
- package/lib/deprecate/deprecate.js +1 -1
- package/lib/hls/hls_parser.js +24 -5
- package/lib/media/manifest_parser.js +3 -2
- package/lib/media/segment_reference.js +4 -1
- package/lib/media/streaming_engine.js +2 -2
- package/lib/player.js +3 -3
- package/lib/polyfill/mediasource.js +5 -36
- package/lib/text/vtt_text_parser.js +2 -1
- package/lib/util/error.js +1 -0
- package/lib/util/periods.js +23 -1
- package/lib/util/stream_utils.js +1 -1
- package/lib/util/ts_parser.js +2 -2
- package/package.json +3 -3
- package/test/dash/dash_parser_segment_template_unit.js +1 -1
- package/test/hls/hls_parser_unit.js +28 -0
- package/test/media/buffering_observer_unit.js +13 -0
- package/test/player_integration.js +9 -1
- package/test/player_load_graph_integration.js +13 -10
- package/test/player_src_equals_integration.js +2 -2
- package/test/player_unit.js +9 -3
- package/test/test/assets/hls-ts-h265/index.m3u8 +2 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +5 -1
- package/test/test/util/waiter.js +5 -0
- package/test/text/vtt_text_parser_unit.js +31 -0
- package/test/transmuxer/transmuxer_integration.js +22 -53
- package/test/util/periods_unit.js +64 -0
- package/ui/less/containers.less +1 -0
|
@@ -1126,6 +1126,37 @@ describe('VttTextParser', () => {
|
|
|
1126
1126
|
{periodStart: 0, segmentStart: 0, segmentEnd: 0, vttOffset: 0});
|
|
1127
1127
|
});
|
|
1128
1128
|
|
|
1129
|
+
it('passes text-shadow when multiple classes included', () => {
|
|
1130
|
+
verifyHelper(
|
|
1131
|
+
[
|
|
1132
|
+
{
|
|
1133
|
+
startTime: 20,
|
|
1134
|
+
endTime: 40,
|
|
1135
|
+
payload: '',
|
|
1136
|
+
nestedCues: [
|
|
1137
|
+
{
|
|
1138
|
+
startTime: 20,
|
|
1139
|
+
endTime: 40,
|
|
1140
|
+
payload: 'Test',
|
|
1141
|
+
fontStyle: Cue.fontStyle.ITALIC,
|
|
1142
|
+
textShadow: 'black 5%',
|
|
1143
|
+
},
|
|
1144
|
+
],
|
|
1145
|
+
},
|
|
1146
|
+
],
|
|
1147
|
+
'WEBVTT\n\n' +
|
|
1148
|
+
'STYLE\n' +
|
|
1149
|
+
'::cue(.shadow) {\n' +
|
|
1150
|
+
' text-shadow: black 5%;\n' +
|
|
1151
|
+
'}\n' +
|
|
1152
|
+
'::cue(.italic) {\n' +
|
|
1153
|
+
' font-style: italic;\n' +
|
|
1154
|
+
'}\n\n' +
|
|
1155
|
+
'00:00:20.000 --> 00:00:40.000\n' +
|
|
1156
|
+
'<c.shadow.italic>Test</c>',
|
|
1157
|
+
{periodStart: 0, segmentStart: 0, segmentEnd: 0, vttOffset: 0});
|
|
1158
|
+
});
|
|
1159
|
+
|
|
1129
1160
|
it('supports karaoke style text', () => {
|
|
1130
1161
|
verifyHelper(
|
|
1131
1162
|
[
|
|
@@ -4,36 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* For unknown reasons, these tests fail in the test labs for Edge on Windows,
|
|
9
|
-
* in ways that do not seem to be unrelated to transmuxers.
|
|
10
|
-
* Practical testing has not found any sign that playback is actually broken in
|
|
11
|
-
* Edge, so these tests are disabled on Edge for the time being.
|
|
12
|
-
* TODO(#5834): Remove this filter once the tests are fixed.
|
|
13
|
-
* @return {boolean}
|
|
14
|
-
*/
|
|
15
|
-
function checkNoBrokenEdge() {
|
|
16
|
-
const chromeVersion = shaka.util.Platform.chromeVersion();
|
|
17
|
-
if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
|
|
18
|
-
chromeVersion && chromeVersion <= 122) {
|
|
19
|
-
// When the tests fail, it's due to the manifest parser failing to find a
|
|
20
|
-
// factory. Attempt to find a factory first, to avoid filtering the tests
|
|
21
|
-
// when running in a non-broken Edge environment.
|
|
22
|
-
const uri = 'fakeuri.m3u8';
|
|
23
|
-
const mimeType = 'application/x-mpegurl';
|
|
24
|
-
/* eslint-disable no-restricted-syntax */
|
|
25
|
-
try {
|
|
26
|
-
shaka.media.ManifestParser.getFactory(uri, mimeType);
|
|
27
|
-
return true;
|
|
28
|
-
} catch (error) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
/* eslint-enable no-restricted-syntax */
|
|
32
|
-
}
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
7
|
+
describe('Transmuxer Player', () => {
|
|
37
8
|
const Util = shaka.test.Util;
|
|
38
9
|
|
|
39
10
|
/** @type {!jasmine.Spy} */
|
|
@@ -51,6 +22,23 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
|
51
22
|
/** @type {!shaka.test.Waiter} */
|
|
52
23
|
let waiter;
|
|
53
24
|
|
|
25
|
+
function isH265Supported() {
|
|
26
|
+
if (!MediaSource.isTypeSupported('video/mp4; codecs="hvc1.2.4.L123.B0"')) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
// As of Chrome 122, Chrome on Windows is still incorrectly reporting H.265
|
|
30
|
+
// support. Revisit this exclusion with a maximum chromeVersion if Chrome
|
|
31
|
+
// ever fixes it.
|
|
32
|
+
// We don't have a solid bug link for this issue. It's unclear if this is
|
|
33
|
+
// specific to GitHub CI systems, which may be missing some codecs.
|
|
34
|
+
const chromeVersion = shaka.util.Platform.chromeVersion();
|
|
35
|
+
if (shaka.util.Platform.isWindows() && chromeVersion) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1450313
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
54
42
|
function isAc3Supported() {
|
|
55
43
|
if (!MediaSource.isTypeSupported('audio/mp4; codecs="ac-3"')) {
|
|
56
44
|
return false;
|
|
@@ -64,9 +52,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
|
64
52
|
// to true, which leads to a failure in GitHub's environment.
|
|
65
53
|
// We must enable this, once it is resolved:
|
|
66
54
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1450313
|
|
67
|
-
|
|
68
|
-
if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
|
|
69
|
-
chromeVersion && chromeVersion <= 122) {
|
|
55
|
+
if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge()) {
|
|
70
56
|
return false;
|
|
71
57
|
}
|
|
72
58
|
return true;
|
|
@@ -85,9 +71,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
|
85
71
|
// to true, which leads to a failure in GitHub's environment.
|
|
86
72
|
// We must enable this, once it is resolved:
|
|
87
73
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1450313
|
|
88
|
-
|
|
89
|
-
if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge() &&
|
|
90
|
-
chromeVersion && chromeVersion <= 122) {
|
|
74
|
+
if (shaka.util.Platform.isWindows() && shaka.util.Platform.isEdge()) {
|
|
91
75
|
return false;
|
|
92
76
|
}
|
|
93
77
|
return true;
|
|
@@ -305,15 +289,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
|
305
289
|
});
|
|
306
290
|
|
|
307
291
|
it('H.265 in TS', async () => {
|
|
308
|
-
|
|
309
|
-
if (shaka.util.Platform.isWindows() &&
|
|
310
|
-
chromeVersion && chromeVersion === 117) {
|
|
311
|
-
// It appears that Chrome 117 beta in Windows is incorrectly reporting
|
|
312
|
-
// H.265 in MediaCapabilities
|
|
313
|
-
pending('Codec H.265 is not supported by the platform.');
|
|
314
|
-
}
|
|
315
|
-
const mimeType = 'video/mp4; codecs="hvc1.2.4.L123.B0"';
|
|
316
|
-
if (!MediaSource.isTypeSupported(mimeType)) {
|
|
292
|
+
if (!isH265Supported()) {
|
|
317
293
|
pending('Codec H.265 is not supported by the platform.');
|
|
318
294
|
}
|
|
319
295
|
await player.load('/base/test/test/assets/hls-ts-h265/hevc.m3u8');
|
|
@@ -351,14 +327,7 @@ filterDescribe('Transmuxer Player', checkNoBrokenEdge, () => {
|
|
|
351
327
|
});
|
|
352
328
|
|
|
353
329
|
it('H.265+AAC in TS', async () => {
|
|
354
|
-
|
|
355
|
-
if (shaka.util.Platform.isWindows() &&
|
|
356
|
-
chromeVersion && chromeVersion === 117) {
|
|
357
|
-
// It appears that Chrome 117 beta in Windows is incorrectly reporting
|
|
358
|
-
// H.265 in MediaCapabilities
|
|
359
|
-
pending('Codec H.265 is not supported by the platform.');
|
|
360
|
-
}
|
|
361
|
-
if (!MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.90"')) {
|
|
330
|
+
if (!isH265Supported()) {
|
|
362
331
|
pending('Codec H.265 is not supported by the platform.');
|
|
363
332
|
}
|
|
364
333
|
// eslint-disable-next-line max-len
|
|
@@ -1060,6 +1060,70 @@ describe('PeriodCombiner', () => {
|
|
|
1060
1060
|
expect(audio2.originalId).toBe('2,4');
|
|
1061
1061
|
});
|
|
1062
1062
|
|
|
1063
|
+
it('Matches streams with labels', async () => {
|
|
1064
|
+
const stream1 = makeAudioStream('en', /* channels= */ 2);
|
|
1065
|
+
stream1.originalId = '1';
|
|
1066
|
+
stream1.bandwidth = 129597;
|
|
1067
|
+
stream1.codecs = 'mp4a.40.2';
|
|
1068
|
+
|
|
1069
|
+
const stream2 = makeAudioStream('en', /* channels= */ 2);
|
|
1070
|
+
stream2.originalId = '2';
|
|
1071
|
+
stream2.bandwidth = 129637;
|
|
1072
|
+
stream2.codecs = 'mp4a.40.2';
|
|
1073
|
+
stream2.label = 'description';
|
|
1074
|
+
|
|
1075
|
+
const stream3 = makeAudioStream('en', /* channels= */ 2);
|
|
1076
|
+
stream3.originalId = '3';
|
|
1077
|
+
stream3.bandwidth = 131037;
|
|
1078
|
+
stream3.codecs = 'mp4a.40.2';
|
|
1079
|
+
|
|
1080
|
+
const stream4 = makeAudioStream('en', /* channels= */ 2);
|
|
1081
|
+
stream4.originalId = '4';
|
|
1082
|
+
stream4.bandwidth = 131034;
|
|
1083
|
+
stream4.codecs = 'mp4a.40.2';
|
|
1084
|
+
stream4.label = 'description';
|
|
1085
|
+
|
|
1086
|
+
/** @type {!Array.<shaka.extern.Period>} */
|
|
1087
|
+
const periods = [
|
|
1088
|
+
{
|
|
1089
|
+
id: '0',
|
|
1090
|
+
videoStreams: [
|
|
1091
|
+
makeVideoStream(1080),
|
|
1092
|
+
],
|
|
1093
|
+
audioStreams: [
|
|
1094
|
+
stream1,
|
|
1095
|
+
stream2,
|
|
1096
|
+
],
|
|
1097
|
+
textStreams: [],
|
|
1098
|
+
imageStreams: [],
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
id: '1',
|
|
1102
|
+
videoStreams: [
|
|
1103
|
+
makeVideoStream(1080),
|
|
1104
|
+
],
|
|
1105
|
+
audioStreams: [
|
|
1106
|
+
stream3,
|
|
1107
|
+
stream4,
|
|
1108
|
+
],
|
|
1109
|
+
textStreams: [],
|
|
1110
|
+
imageStreams: [],
|
|
1111
|
+
},
|
|
1112
|
+
];
|
|
1113
|
+
|
|
1114
|
+
await combiner.combinePeriods(periods, /* isDynamic= */ true);
|
|
1115
|
+
const variants = combiner.getVariants();
|
|
1116
|
+
expect(variants.length).toBe(2);
|
|
1117
|
+
// We can use the originalId field to see what each track is composed of.
|
|
1118
|
+
const audio1 = variants[0].audio;
|
|
1119
|
+
expect(audio1.label).toBe(null);
|
|
1120
|
+
expect(audio1.originalId).toBe('1,3');
|
|
1121
|
+
|
|
1122
|
+
const audio2 = variants[1].audio;
|
|
1123
|
+
expect(audio2.label).toBe('description');
|
|
1124
|
+
expect(audio2.originalId).toBe('2,4');
|
|
1125
|
+
});
|
|
1126
|
+
|
|
1063
1127
|
it('Matches streams with related codecs', async () => {
|
|
1064
1128
|
const stream1 = makeVideoStream(1080);
|
|
1065
1129
|
stream1.originalId = '1';
|