shaka-player 4.8.8 → 4.8.9
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 +34 -34
- package/dist/shaka-player.compiled.debug.js +11 -11
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +916 -916
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +14 -14
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +1089 -1089
- package/dist/shaka-player.ui.map +2 -2
- package/lib/cea/cea608_data_channel.js +9 -0
- package/lib/cea/cea_decoder.js +6 -2
- package/lib/media/manifest_filterer.js +8 -12
- package/lib/media/preload_manager.js +3 -10
- package/lib/player.js +1 -1
- package/package.json +1 -1
|
@@ -642,6 +642,15 @@ shaka.cea.Cea608DataChannel = class {
|
|
|
642
642
|
// b1 -> |P|0|0|1|X|X|X|X|
|
|
643
643
|
return (b1 & 0x70) === 0x10;
|
|
644
644
|
}
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Checks if the data contains a XDS control code.
|
|
648
|
+
* @param {number} b1 Byte 1.
|
|
649
|
+
* @return {boolean}
|
|
650
|
+
*/
|
|
651
|
+
static isXdsControlCode(b1) {
|
|
652
|
+
return b1 >= 0x01 && b1 <= 0x0F;
|
|
653
|
+
}
|
|
645
654
|
};
|
|
646
655
|
|
|
647
656
|
/**
|
package/lib/cea/cea_decoder.js
CHANGED
|
@@ -307,16 +307,20 @@ shaka.cea.CeaDecoder = class {
|
|
|
307
307
|
ccPacket.ccData1 &= 0x7f;
|
|
308
308
|
ccPacket.ccData2 &= 0x7f;
|
|
309
309
|
|
|
310
|
+
// Ignore XDS
|
|
311
|
+
if (shaka.cea.Cea608DataChannel.isXdsControlCode(ccPacket.ccData1)) {
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
|
|
310
315
|
// Check for empty captions and skip them.
|
|
311
316
|
if (!ccPacket.ccData1 && !ccPacket.ccData2) {
|
|
312
317
|
return null;
|
|
313
318
|
}
|
|
314
319
|
|
|
315
|
-
this.streams_.add(selectedMode);
|
|
316
|
-
|
|
317
320
|
// Process the clean CC data pair.
|
|
318
321
|
let parsedClosedCaption = null;
|
|
319
322
|
if (shaka.cea.Cea608DataChannel.isControlCode(ccPacket.ccData1)) {
|
|
323
|
+
this.streams_.add(selectedMode);
|
|
320
324
|
parsedClosedCaption = selectedStream.handleControlCode(ccPacket);
|
|
321
325
|
} else {
|
|
322
326
|
// Handle as a Basic North American Character.
|
|
@@ -41,27 +41,23 @@ shaka.media.ManifestFilterer = class {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* Filters a manifest, removing unplayable streams/variants
|
|
44
|
+
* Filters a manifest, removing unplayable streams/variants and choosing
|
|
45
|
+
* the codecs.
|
|
45
46
|
*
|
|
46
47
|
* @param {?shaka.extern.Manifest} manifest
|
|
47
48
|
* @return {!Promise.<boolean>} tracksChanged
|
|
48
49
|
*/
|
|
49
50
|
async filterManifest(manifest) {
|
|
50
|
-
await this.filterManifestWithStreamUtils_(manifest);
|
|
51
|
-
return this.filterManifestWithRestrictions(manifest);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Filters a manifest, removing unplayable streams/variants.
|
|
56
|
-
*
|
|
57
|
-
* @param {?shaka.extern.Manifest} manifest
|
|
58
|
-
* @private
|
|
59
|
-
*/
|
|
60
|
-
async filterManifestWithStreamUtils_(manifest) {
|
|
61
51
|
goog.asserts.assert(manifest, 'Manifest should exist!');
|
|
62
52
|
await shaka.util.StreamUtils.filterManifest(this.drmEngine_, manifest,
|
|
63
53
|
this.config_.drm.preferredKeySystems);
|
|
54
|
+
shaka.util.StreamUtils.chooseCodecsAndFilterManifest(
|
|
55
|
+
manifest,
|
|
56
|
+
this.config_.preferredVideoCodecs,
|
|
57
|
+
this.config_.preferredAudioCodecs,
|
|
58
|
+
this.config_.preferredDecodingAttributes);
|
|
64
59
|
this.checkPlayableVariants_(manifest);
|
|
60
|
+
return this.filterManifestWithRestrictions(manifest);
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
|
|
@@ -553,7 +553,9 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
|
|
|
553
553
|
|
|
554
554
|
const tracksChangedInitial = this.manifestFilterer_.applyRestrictions(
|
|
555
555
|
this.manifest_);
|
|
556
|
-
|
|
556
|
+
const tracksChangedBefore = await this.manifestFilterer_.filterManifest(
|
|
557
|
+
this.manifest_);
|
|
558
|
+
if (tracksChangedInitial || tracksChangedBefore) {
|
|
557
559
|
const event = this.makeEvent_(
|
|
558
560
|
shaka.util.FakeEvent.EventName.TracksChanged);
|
|
559
561
|
await Promise.resolve();
|
|
@@ -568,7 +570,6 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
|
|
|
568
570
|
|
|
569
571
|
// Now that we have drm information, filter the manifest (again) so that
|
|
570
572
|
// we can ensure we only use variants with the selected key system.
|
|
571
|
-
// const tracksChanged =
|
|
572
573
|
const tracksChangedAfter = await this.manifestFilterer_.filterManifest(
|
|
573
574
|
this.manifest_);
|
|
574
575
|
if (tracksChangedAfter) {
|
|
@@ -630,14 +631,6 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
|
|
|
630
631
|
this.config_.preferredVideoLabel,
|
|
631
632
|
this.config_.mediaSource.codecSwitchingStrategy,
|
|
632
633
|
this.config_.manifest.dash.enableAudioGroups);
|
|
633
|
-
|
|
634
|
-
// If the content is multi-codec and the browser can play more than one of
|
|
635
|
-
// them, choose codecs now before we initialize streaming.
|
|
636
|
-
shaka.util.StreamUtils.chooseCodecsAndFilterManifest(
|
|
637
|
-
this.manifest_,
|
|
638
|
-
this.config_.preferredVideoCodecs,
|
|
639
|
-
this.config_.preferredAudioCodecs,
|
|
640
|
-
this.config_.preferredDecodingAttributes);
|
|
641
634
|
}
|
|
642
635
|
|
|
643
636
|
// Make the ABR manager.
|
package/lib/player.js
CHANGED
|
@@ -7239,7 +7239,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
|
|
|
7239
7239
|
* @export
|
|
7240
7240
|
*/
|
|
7241
7241
|
// eslint-disable-next-line no-useless-concat
|
|
7242
|
-
shaka.Player.version = 'v4.8.
|
|
7242
|
+
shaka.Player.version = 'v4.8.9' + '-uncompiled'; // x-release-please-version
|
|
7243
7243
|
|
|
7244
7244
|
// Initialize the deprecation system using the version string we just set
|
|
7245
7245
|
// on the player.
|