shaka-player 3.2.20 → 3.2.21
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/selenium-lab-tests.yaml +23 -1
- package/AUTHORS +2 -1
- package/CHANGELOG.md +18 -0
- package/CONTRIBUTORS +4 -1
- package/dist/controls.css +1 -1
- package/dist/locales.js +28 -28
- package/dist/shaka-player.compiled.d.ts +6 -2
- package/dist/shaka-player.compiled.debug.d.ts +6 -2
- package/dist/shaka-player.compiled.debug.js +148 -146
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +264 -263
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +6 -2
- package/dist/shaka-player.ui.debug.d.ts +6 -2
- package/dist/shaka-player.ui.debug.js +87 -85
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +296 -295
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/fairplay.md +2 -2
- package/externs/shaka/net.js +1 -0
- package/externs/shaka/player.js +13 -7
- package/lib/ads/client_side_ad_manager.js +2 -2
- package/lib/media/media_source_engine.js +9 -4
- package/lib/media/streaming_engine.js +8 -3
- package/lib/net/http_fetch_plugin.js +10 -0
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +17 -2
- package/lib/polyfill/media_capabilities.js +13 -0
- package/lib/text/mp4_vtt_parser.js +4 -0
- package/lib/text/text_engine.js +1 -0
- package/lib/util/manifest_parser_utils.js +1 -2
- package/lib/util/mime_utils.js +11 -0
- package/lib/util/stream_utils.js +2 -2
- package/maintained-branches.md +3 -4
- package/package.json +1 -1
- package/test/media/content_workarounds_unit.js +43 -0
- package/test/media/drm_engine_integration.js +4 -17
- package/test/media/streaming_engine_unit.js +6 -1
- package/test/net/networking_engine_unit.js +6 -1
- package/test/player_integration.js +39 -0
- package/test/player_unit.js +54 -0
- package/test/polyfill/media_capabilities_unit.js +0 -1
- package/test/test/assets/text-clip-alt.vtt +63 -0
- package/test/test/util/fake_drm_engine.js +3 -0
- package/test/test/util/simple_fakes.js +3 -0
- package/test/test/util/test_scheme.js +9 -14
- package/test/text/mp4_vtt_parser_unit.js +8 -0
- package/test/util/mime_utils_unit.js +10 -0
|
@@ -431,6 +431,7 @@ const widevineDrmServers = {
|
|
|
431
431
|
|
|
432
432
|
/** @type {AVMetadataType} */
|
|
433
433
|
const axinomMultiDrmVideoSegment = {
|
|
434
|
+
// Taken from Axinom's v6 test vector.
|
|
434
435
|
initSegmentUri: '/base/test/test/assets/multidrm-video-init.mp4',
|
|
435
436
|
mdhdOffset: 0x1d1,
|
|
436
437
|
segmentUri: '/base/test/test/assets/multidrm-video-segment.mp4',
|
|
@@ -445,6 +446,7 @@ const axinomMultiDrmVideoSegment = {
|
|
|
445
446
|
|
|
446
447
|
/** @type {AVMetadataType} */
|
|
447
448
|
const axinomMultiDrmAudioSegment = {
|
|
449
|
+
// Taken from Axinom's v6 test vector.
|
|
448
450
|
initSegmentUri: '/base/test/test/assets/multidrm-audio-init.mp4',
|
|
449
451
|
mdhdOffset: 0x192,
|
|
450
452
|
segmentUri: '/base/test/test/assets/multidrm-audio-segment.mp4',
|
|
@@ -459,20 +461,15 @@ const axinomMultiDrmAudioSegment = {
|
|
|
459
461
|
|
|
460
462
|
/** @type {!Object.<string, string>} */
|
|
461
463
|
const axinomDrmServers = {
|
|
464
|
+
// NOTE: These are not Axinom's actual servers. These are test servers for
|
|
465
|
+
// Widevine and PlayReady that let us specify the known key IDs and keys for
|
|
466
|
+
// Axinom's v6 test vectors. Axinom's own servers started returning 403
|
|
467
|
+
// errors for these older test vectors, and we were forced to switch to
|
|
468
|
+
// something stable and independent.
|
|
462
469
|
'com.widevine.alpha':
|
|
463
|
-
'https://
|
|
470
|
+
'https://cwip-shaka-proxy.appspot.com/specific_key?blodJidXR9eARuql0dNLWg=GX8m9XLIZNIzizrl0RTqnA',
|
|
464
471
|
'com.microsoft.playready':
|
|
465
|
-
'https://
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
/** @type {!Object.<string, string>} */
|
|
469
|
-
const axinomDrmHeaders = {
|
|
470
|
-
'X-AxDRM-Message':
|
|
471
|
-
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5' +
|
|
472
|
-
'X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc' +
|
|
473
|
-
'2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIj' +
|
|
474
|
-
'oiNmU1YTFkMjYtMjc1Ny00N2Q3LTgwNDYtZWFhNWQxZDM0YjVhIn1dfX0.yF7PflO' +
|
|
475
|
-
'Pv9qHnu3ZWJNZ12jgkqTabmwXbDWk_47tLNE',
|
|
472
|
+
'https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:6e5a1d26-2757-47d7-8046-eaa5d1d34b5a,contentkey:GX8m9XLIZNIzizrl0RTqnA==,sl:150)',
|
|
476
473
|
};
|
|
477
474
|
|
|
478
475
|
/** @type {TextMetadataType} */
|
|
@@ -568,7 +565,6 @@ shaka.test.TestScheme.DATA = {
|
|
|
568
565
|
audio: axinomMultiDrmAudioSegment,
|
|
569
566
|
text: vttSegment,
|
|
570
567
|
licenseServers: axinomDrmServers,
|
|
571
|
-
licenseRequestHeaders: axinomDrmHeaders,
|
|
572
568
|
duration: 30,
|
|
573
569
|
},
|
|
574
570
|
|
|
@@ -580,7 +576,6 @@ shaka.test.TestScheme.DATA = {
|
|
|
580
576
|
initData: undefined,
|
|
581
577
|
}),
|
|
582
578
|
licenseServers: axinomDrmServers,
|
|
583
|
-
licenseRequestHeaders: axinomDrmHeaders,
|
|
584
579
|
duration: 30,
|
|
585
580
|
},
|
|
586
581
|
|
|
@@ -170,6 +170,14 @@ describe('Mp4VttParser', () => {
|
|
|
170
170
|
verifyHelper(cues, result);
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
+
it('handles empty media segments', () => {
|
|
174
|
+
const parser = new shaka.text.Mp4VttParser();
|
|
175
|
+
parser.parseInit(vttInitSegment);
|
|
176
|
+
const time = {periodStart: 0, segmentStart: 0, segmentEnd: 0, vttOffset: 0};
|
|
177
|
+
const result = parser.parseMedia(new Uint8Array(0), time);
|
|
178
|
+
verifyHelper([], result);
|
|
179
|
+
});
|
|
180
|
+
|
|
173
181
|
it('rejects init segment with no vtt', () => {
|
|
174
182
|
const error = shaka.test.Util.jasmineError(new shaka.util.Error(
|
|
175
183
|
shaka.util.Error.Severity.CRITICAL,
|
|
@@ -51,4 +51,14 @@ describe('MimeUtils', () => {
|
|
|
51
51
|
expect(getNormalizedCodec('dvh1.05')).toBe('dovi');
|
|
52
52
|
expect(getNormalizedCodec('dvhe.05')).toBe('dovi');
|
|
53
53
|
});
|
|
54
|
+
|
|
55
|
+
it('isHlsType', () => {
|
|
56
|
+
const isHlsType = (mimeType) => shaka.util.MimeUtils.isHlsType(mimeType);
|
|
57
|
+
|
|
58
|
+
expect(isHlsType('application/x-mpegurl')).toBe(true);
|
|
59
|
+
expect(isHlsType('application/vnd.apple.mpegurl')).toBe(true);
|
|
60
|
+
expect(isHlsType('application/dash+xml')).toBe(false);
|
|
61
|
+
expect(isHlsType('application/vnd.ms-sstr+xml')).toBe(false);
|
|
62
|
+
expect(isHlsType('foo')).toBe(false);
|
|
63
|
+
});
|
|
54
64
|
});
|