shaka-player 3.2.2 → 3.2.3
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/CHANGELOG.md +46 -0
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +21 -2
- package/dist/shaka-player.compiled.debug.d.ts +21 -2
- package/dist/shaka-player.compiled.debug.externs.js +22 -1
- package/dist/shaka-player.compiled.debug.js +205 -202
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +22 -1
- package/dist/shaka-player.compiled.js +727 -723
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +21 -2
- package/dist/shaka-player.ui.debug.d.ts +21 -2
- package/dist/shaka-player.ui.debug.externs.js +22 -1
- package/dist/shaka-player.ui.debug.js +221 -218
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +22 -1
- package/dist/shaka-player.ui.js +829 -825
- package/dist/shaka-player.ui.map +4 -4
- package/externs/shaka/player.js +8 -0
- package/externs/shaka/text.js +10 -0
- package/lib/dash/dash_parser.js +4 -2
- package/lib/hls/hls_parser.js +30 -0
- package/lib/media/segment_index.js +2 -1
- package/lib/media/segment_reference.js +19 -1
- package/lib/media/streaming_engine.js +5 -2
- package/lib/player.js +20 -13
- package/lib/polyfill/media_capabilities.js +30 -15
- package/lib/text/cue.js +6 -0
- package/lib/text/ttml_text_parser.js +84 -58
- package/lib/text/ui_text_displayer.js +17 -11
- package/lib/util/stream_utils.js +86 -10
- package/lib/util/xml_utils.js +19 -0
- package/package.json +2 -2
- package/test/dash/dash_parser_manifest_unit.js +33 -1
- package/test/media/drm_engine_unit.js +3 -3
- package/test/media/streaming_engine_integration.js +2 -1
- package/test/media/streaming_engine_unit.js +145 -0
- package/test/player_integration.js +41 -8
- package/test/player_src_equals_integration.js +41 -8
- package/test/player_unit.js +19 -9
- package/test/test/assets/chapters.vtt +2 -2
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/util/ttml_utils.js +81 -0
- package/test/text/mp4_ttml_parser_unit.js +11 -18
- package/test/text/ttml_text_parser_unit.js +495 -228
- package/test/util/stream_utils_unit.js +36 -30
- package/ui/less/buttons.less +0 -4
- package/ui/text_selection.js +1 -0
- package/externs/media_capabilities.js +0 -16
|
@@ -16,14 +16,14 @@ describe('StreamUtils', () => {
|
|
|
16
16
|
/** @type {!jasmine.Spy} */
|
|
17
17
|
let decodingInfoSpy;
|
|
18
18
|
|
|
19
|
-
const originalDecodingInfo =
|
|
19
|
+
const originalDecodingInfo = navigator.mediaCapabilities.decodingInfo;
|
|
20
20
|
|
|
21
21
|
beforeEach(() => {
|
|
22
22
|
decodingInfoSpy = jasmine.createSpy('decodingInfo');
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
afterEach(() => {
|
|
26
|
-
|
|
26
|
+
navigator.mediaCapabilities.decodingInfo = originalDecodingInfo;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
describe('filterStreamsByLanguageAndRole', () => {
|
|
@@ -511,7 +511,7 @@ describe('StreamUtils', () => {
|
|
|
511
511
|
});
|
|
512
512
|
|
|
513
513
|
it('handles decodingInfo exception', async () => {
|
|
514
|
-
|
|
514
|
+
navigator.mediaCapabilities.decodingInfo =
|
|
515
515
|
shaka.test.Util.spyFunc(decodingInfoSpy);
|
|
516
516
|
// If decodingInfo() fails, setDecodingInfo should finish without throwing
|
|
517
517
|
// an exception, and the variant should have no decodingInfo result.
|
|
@@ -539,38 +539,44 @@ describe('StreamUtils', () => {
|
|
|
539
539
|
});
|
|
540
540
|
|
|
541
541
|
it('includes transferFunction in config when hdr', async () => {
|
|
542
|
-
|
|
543
|
-
shaka.test.Util.spyFunc(decodingInfoSpy);
|
|
542
|
+
const originalDecodingInfo = navigator.mediaCapabilities.decodingInfo;
|
|
544
543
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
544
|
+
try {
|
|
545
|
+
navigator.mediaCapabilities.decodingInfo =
|
|
546
|
+
shaka.test.Util.spyFunc(decodingInfoSpy);
|
|
547
|
+
|
|
548
|
+
manifest = shaka.test.ManifestGenerator.generate((manifest) => {
|
|
549
|
+
manifest.addVariant(0, (variant) => {
|
|
550
|
+
variant.addVideo(0, (stream) => {
|
|
551
|
+
stream.mime('video/mp4', 'avc1.640028');
|
|
552
|
+
stream.hdr = 'SDR';
|
|
553
|
+
});
|
|
550
554
|
});
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
555
|
+
manifest.addVariant(1, (variant) => {
|
|
556
|
+
variant.addVideo(1, (stream) => {
|
|
557
|
+
stream.mime('video/mp4', 'hvc1.2.4.L150.90');
|
|
558
|
+
stream.hdr = 'PQ';
|
|
559
|
+
});
|
|
556
560
|
});
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
561
|
+
manifest.addVariant(2, (variant) => {
|
|
562
|
+
variant.addVideo(2, (stream) => {
|
|
563
|
+
stream.mime('video/mp4', 'hvc1.2.4.L153.B0');
|
|
564
|
+
stream.hdr = 'HLG';
|
|
565
|
+
});
|
|
562
566
|
});
|
|
563
567
|
});
|
|
564
|
-
});
|
|
565
568
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
569
|
+
await StreamUtils.getDecodingInfosForVariants(manifest.variants,
|
|
570
|
+
/* usePersistentLicenses= */ false, /* srcEquals= */ false);
|
|
571
|
+
expect(decodingInfoSpy.calls.argsFor(0)[0].video.transferFunction)
|
|
572
|
+
.toBe('srgb');
|
|
573
|
+
expect(decodingInfoSpy.calls.argsFor(1)[0].video.transferFunction)
|
|
574
|
+
.toBe('pq');
|
|
575
|
+
expect(decodingInfoSpy.calls.argsFor(2)[0].video.transferFunction)
|
|
576
|
+
.toBe('hlg');
|
|
577
|
+
} finally {
|
|
578
|
+
navigator.mediaCapabilities.decodingInfo = originalDecodingInfo;
|
|
579
|
+
}
|
|
574
580
|
});
|
|
575
581
|
});
|
|
576
582
|
|
|
@@ -861,7 +867,7 @@ describe('StreamUtils', () => {
|
|
|
861
867
|
});
|
|
862
868
|
});
|
|
863
869
|
});
|
|
864
|
-
|
|
870
|
+
navigator.mediaCapabilities.decodingInfo =
|
|
865
871
|
shaka.test.Util.spyFunc(decodingInfoSpy);
|
|
866
872
|
decodingInfoSpy.and.callFake((config) => {
|
|
867
873
|
const res = config.video.contentType.includes('notsmooth') ?
|
package/ui/less/buttons.less
CHANGED
|
@@ -75,10 +75,6 @@
|
|
|
75
75
|
.shaka-current-time {
|
|
76
76
|
font-size: 14px;
|
|
77
77
|
color: rgb(255, 255, 255);
|
|
78
|
-
|
|
79
|
-
/* Make the time element the right size for the text, instead of defaulting
|
|
80
|
-
* to the same size as the rest of the controls. */
|
|
81
|
-
height: auto;
|
|
82
78
|
cursor: pointer;
|
|
83
79
|
|
|
84
80
|
&[disabled] {
|
package/ui/text_selection.js
CHANGED
|
@@ -64,6 +64,7 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
|
|
|
64
64
|
|
|
65
65
|
this.eventManager.listen(this.player, 'texttrackvisibility', () => {
|
|
66
66
|
this.onCaptionStateChange_();
|
|
67
|
+
this.updateTextLanguages_();
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
this.eventManager.listen(this.player, 'textchanged', () => {
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*! @license
|
|
2
|
-
* Shaka Player
|
|
3
|
-
* Copyright 2016 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @fileoverview Externs for Shaka MediaCapabilities which were missing in the
|
|
9
|
-
* Closure compiler.
|
|
10
|
-
*
|
|
11
|
-
* @externs
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/** @type {MediaCapabilities} */
|
|
16
|
-
window.shakaMediaCapabilities;
|