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.
Files changed (60) hide show
  1. package/README.md +2 -4
  2. package/dist/deps.js +6 -7
  3. package/dist/locales.js +34 -34
  4. package/dist/shaka-player.compiled.d.ts +14 -12
  5. package/dist/shaka-player.compiled.debug.d.ts +14 -12
  6. package/dist/shaka-player.compiled.debug.externs.js +78 -64
  7. package/dist/shaka-player.compiled.debug.js +321 -312
  8. package/dist/shaka-player.compiled.debug.map +4 -4
  9. package/dist/shaka-player.compiled.externs.js +78 -64
  10. package/dist/shaka-player.compiled.js +1167 -1153
  11. package/dist/shaka-player.compiled.map +4 -4
  12. package/dist/shaka-player.ui.d.ts +14 -12
  13. package/dist/shaka-player.ui.debug.d.ts +14 -12
  14. package/dist/shaka-player.ui.debug.externs.js +78 -64
  15. package/dist/shaka-player.ui.debug.js +443 -434
  16. package/dist/shaka-player.ui.debug.map +4 -4
  17. package/dist/shaka-player.ui.externs.js +78 -64
  18. package/dist/shaka-player.ui.js +1319 -1305
  19. package/dist/shaka-player.ui.map +4 -4
  20. package/externs/shaka/manifest.js +11 -1
  21. package/externs/shaka/offline.js +7 -1
  22. package/externs/shaka/player.js +32 -19
  23. package/lib/abr/simple_abr_manager.js +21 -26
  24. package/lib/cast/cast_proxy.js +1 -3
  25. package/lib/cast/cast_sender.js +8 -11
  26. package/lib/cea/cea608_memory.js +1 -1
  27. package/lib/cea/ts_cea_parser.js +10 -1
  28. package/lib/dash/dash_parser.js +13 -3
  29. package/lib/dash/segment_base.js +8 -1
  30. package/lib/dash/segment_list.js +24 -18
  31. package/lib/dash/segment_template.js +21 -2
  32. package/lib/hls/hls_parser.js +36 -17
  33. package/lib/media/drm_engine.js +6 -3
  34. package/lib/media/media_source_engine.js +96 -33
  35. package/lib/media/playhead.js +3 -3
  36. package/lib/media/presentation_timeline.js +23 -0
  37. package/lib/media/segment_index.js +21 -20
  38. package/lib/media/segment_utils.js +10 -1
  39. package/lib/media/streaming_engine.js +2 -14
  40. package/lib/mss/mss_parser.js +4 -0
  41. package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
  42. package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
  43. package/lib/offline/manifest_converter.js +10 -3
  44. package/lib/offline/storage.js +2 -0
  45. package/lib/player.js +30 -4
  46. package/lib/polyfill/media_capabilities.js +20 -1
  47. package/lib/polyfill/mediasource.js +37 -14
  48. package/lib/text/vtt_text_parser.js +51 -51
  49. package/lib/transmuxer/h264.js +3 -3
  50. package/lib/transmuxer/h265.js +3 -3
  51. package/lib/transmuxer/ts_transmuxer.js +42 -3
  52. package/lib/util/manifest_parser_utils.js +1 -0
  53. package/lib/util/mime_utils.js +10 -5
  54. package/lib/util/mp4_parser.js +57 -0
  55. package/lib/util/periods.js +5 -37
  56. package/lib/util/platform.js +4 -0
  57. package/lib/util/stream_utils.js +334 -271
  58. package/lib/util/ts_parser.js +99 -10
  59. package/package.json +1 -1
  60. package/lib/polyfill/storage_estimate.js +0 -57
@@ -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 codec of this stream to the output stream's codecs.
725
- const codecs = new Set(outputStream.codecs.split(','));
726
- for (const codec of match.codecs.split(',')) {
727
- if (codec) {
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
 
@@ -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