shaka-player 4.7.11 → 4.7.13
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/README.md +2 -4
- package/dist/deps.js +6 -7
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +14 -12
- package/dist/shaka-player.compiled.debug.d.ts +14 -12
- package/dist/shaka-player.compiled.debug.externs.js +78 -64
- package/dist/shaka-player.compiled.debug.js +321 -312
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +78 -64
- package/dist/shaka-player.compiled.js +1167 -1153
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +14 -12
- package/dist/shaka-player.ui.debug.d.ts +14 -12
- package/dist/shaka-player.ui.debug.externs.js +78 -64
- package/dist/shaka-player.ui.debug.js +443 -434
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +78 -64
- package/dist/shaka-player.ui.js +1319 -1305
- package/dist/shaka-player.ui.map +4 -4
- package/externs/shaka/manifest.js +11 -1
- package/externs/shaka/offline.js +7 -1
- package/externs/shaka/player.js +32 -19
- package/lib/abr/simple_abr_manager.js +21 -26
- package/lib/cast/cast_proxy.js +1 -3
- package/lib/cast/cast_sender.js +8 -11
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/ts_cea_parser.js +10 -1
- package/lib/dash/dash_parser.js +13 -3
- package/lib/dash/segment_base.js +8 -1
- package/lib/dash/segment_list.js +24 -18
- package/lib/dash/segment_template.js +21 -2
- package/lib/hls/hls_parser.js +36 -17
- package/lib/media/drm_engine.js +6 -3
- package/lib/media/media_source_engine.js +96 -33
- package/lib/media/playhead.js +3 -3
- package/lib/media/presentation_timeline.js +23 -0
- package/lib/media/segment_index.js +21 -20
- package/lib/media/segment_utils.js +10 -1
- package/lib/media/streaming_engine.js +2 -14
- package/lib/mss/mss_parser.js +4 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
- package/lib/offline/manifest_converter.js +10 -3
- package/lib/offline/storage.js +2 -0
- package/lib/player.js +30 -4
- package/lib/polyfill/media_capabilities.js +20 -1
- package/lib/polyfill/mediasource.js +37 -14
- package/lib/text/vtt_text_parser.js +51 -51
- package/lib/transmuxer/h264.js +3 -3
- package/lib/transmuxer/h265.js +3 -3
- package/lib/transmuxer/ts_transmuxer.js +42 -3
- package/lib/util/manifest_parser_utils.js +1 -0
- package/lib/util/mime_utils.js +10 -5
- package/lib/util/mp4_parser.js +57 -0
- package/lib/util/periods.js +5 -37
- package/lib/util/platform.js +4 -0
- package/lib/util/stream_utils.js +334 -271
- package/lib/util/ts_parser.js +99 -10
- package/package.json +1 -1
- package/lib/polyfill/storage_estimate.js +0 -57
package/lib/util/periods.js
CHANGED
|
@@ -599,14 +599,6 @@ shaka.util.PeriodCombiner = class {
|
|
|
599
599
|
goog.asserts.assert(match.segmentIndex,
|
|
600
600
|
'stream should have a segmentIndex.');
|
|
601
601
|
if (match.segmentIndex) {
|
|
602
|
-
match.segmentIndex.forEachTopLevelReference((ref) => {
|
|
603
|
-
ref.codecs = match.codecs;
|
|
604
|
-
ref.mimeType = match.mimeType;
|
|
605
|
-
if (ref.initSegmentReference) {
|
|
606
|
-
ref.initSegmentReference.codecs = match.codecs;
|
|
607
|
-
ref.initSegmentReference.mimeType = match.mimeType;
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
602
|
outputStream.segmentIndex.appendSegmentIndex(match.segmentIndex);
|
|
611
603
|
}
|
|
612
604
|
}
|
|
@@ -721,39 +713,14 @@ shaka.util.PeriodCombiner = class {
|
|
|
721
713
|
|
|
722
714
|
if (used) {
|
|
723
715
|
unusedStreamsPerPeriod[i].delete(match);
|
|
724
|
-
// Add the
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
codecs.add(codec);
|
|
716
|
+
// Add the full mimetypes to the stream.
|
|
717
|
+
if (match.fullMimeTypes) {
|
|
718
|
+
for (const fullMimeType of match.fullMimeTypes.values()) {
|
|
719
|
+
outputStream.fullMimeTypes.add(fullMimeType);
|
|
729
720
|
}
|
|
730
721
|
}
|
|
731
|
-
const PeriodCombiner = shaka.util.PeriodCombiner;
|
|
732
|
-
outputStream.codecs = PeriodCombiner.filterDuplicateCodecs_(
|
|
733
|
-
Array.from(codecs)).join(',');
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* @param {!Array.<string>} codecs
|
|
740
|
-
* @return {!Array.<string>} codecs
|
|
741
|
-
* @private
|
|
742
|
-
*/
|
|
743
|
-
static filterDuplicateCodecs_(codecs) {
|
|
744
|
-
// Filter out duplicate codecs.
|
|
745
|
-
const seen = new Set();
|
|
746
|
-
const ret = [];
|
|
747
|
-
for (const codec of codecs) {
|
|
748
|
-
const shortCodec = shaka.util.MimeUtils.getCodecBase(codec);
|
|
749
|
-
if (!seen.has(shortCodec)) {
|
|
750
|
-
ret.push(codec);
|
|
751
|
-
seen.add(shortCodec);
|
|
752
|
-
} else {
|
|
753
|
-
shaka.log.debug('Ignoring duplicate codec');
|
|
754
722
|
}
|
|
755
723
|
}
|
|
756
|
-
return ret;
|
|
757
724
|
}
|
|
758
725
|
|
|
759
726
|
/**
|
|
@@ -1578,6 +1545,7 @@ shaka.util.PeriodCombiner = class {
|
|
|
1578
1545
|
accessibilityPurpose: null,
|
|
1579
1546
|
external: false,
|
|
1580
1547
|
fastSwitching: false,
|
|
1548
|
+
fullMimeTypes: new Set(),
|
|
1581
1549
|
};
|
|
1582
1550
|
}
|
|
1583
1551
|
|
package/lib/util/platform.js
CHANGED
|
@@ -535,6 +535,10 @@ shaka.util.Platform = class {
|
|
|
535
535
|
Platform.isWebOS4() || Platform.isWebOS5()) {
|
|
536
536
|
return false;
|
|
537
537
|
}
|
|
538
|
+
// See: https://chromium-review.googlesource.com/c/chromium/src/+/4577759
|
|
539
|
+
if (Platform.isWindows() && Platform.isEdge()) {
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
538
542
|
return true;
|
|
539
543
|
}
|
|
540
544
|
|