hls.js 1.6.0-rc.1.0.canary.11076 → 1.6.0-rc.1.0.canary.11077

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/hls.js CHANGED
@@ -1073,7 +1073,7 @@
1073
1073
  // Some browsers don't allow to use bind on console object anyway
1074
1074
  // fallback to default if needed
1075
1075
  try {
1076
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11076");
1076
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11077");
1077
1077
  } catch (e) {
1078
1078
  /* log fn threw an exception. All logger methods are no-ops. */
1079
1079
  return createLogger();
@@ -3007,6 +3007,21 @@
3007
3007
  return getCodecCompatibleNameLower(m.toLowerCase(), preferManagedMediaSource);
3008
3008
  });
3009
3009
  }
3010
+ function replaceVideoCodec(originalCodecs, newVideoCodec) {
3011
+ var codecs = [];
3012
+ if (originalCodecs) {
3013
+ var allCodecs = originalCodecs.split(',');
3014
+ for (var i = 0; i < allCodecs.length; i++) {
3015
+ if (!isCodecType(allCodecs[i], 'video')) {
3016
+ codecs.push(allCodecs[i]);
3017
+ }
3018
+ }
3019
+ }
3020
+ if (newVideoCodec) {
3021
+ codecs.push(newVideoCodec);
3022
+ }
3023
+ return codecs.join(',');
3024
+ }
3010
3025
  function pickMostCompleteCodecName(parsedCodec, levelCodec) {
3011
3026
  // Parsing of mp4a codecs strings in mp4-tools from media is incomplete as of d8c6c7a
3012
3027
  // so use level codec is parsed codec is unavailable or incomplete
@@ -15847,6 +15862,7 @@
15847
15862
  tracks.audiovideo = {
15848
15863
  container: 'video/mp4',
15849
15864
  codec: audioCodec + ',' + videoCodec,
15865
+ supplemental: initData.video.supplemental,
15850
15866
  initSegment: initSegment,
15851
15867
  id: 'main'
15852
15868
  };
@@ -16531,7 +16547,7 @@
16531
16547
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16532
16548
  }
16533
16549
 
16534
- var version = "1.6.0-rc.1.0.canary.11076";
16550
+ var version = "1.6.0-rc.1.0.canary.11077";
16535
16551
 
16536
16552
  // ensure the worker ends up in the bundle
16537
16553
  // If the worker should not be included this gets aliased to empty.js
@@ -19672,10 +19688,11 @@
19672
19688
  _proto.getTrackCodec = function getTrackCodec(track, trackName) {
19673
19689
  // Use supplemental video codec when supported when adding SourceBuffer (#5558)
19674
19690
  var supplementalCodec = track.supplemental;
19675
- if (supplementalCodec && trackName === 'video' && areCodecsMediaSourceSupported(supplementalCodec, trackName)) {
19676
- return supplementalCodec;
19691
+ var trackCodec = track.codec;
19692
+ if (supplementalCodec && (trackName === 'video' || trackName === 'audiovideo') && areCodecsMediaSourceSupported(supplementalCodec, 'video')) {
19693
+ trackCodec = replaceVideoCodec(trackCodec, supplementalCodec);
19677
19694
  }
19678
- var codec = pickMostCompleteCodecName(track.codec, track.levelCodec);
19695
+ var codec = pickMostCompleteCodecName(trackCodec, track.levelCodec);
19679
19696
  if (codec) {
19680
19697
  if (trackName.slice(0, 5) === 'audio') {
19681
19698
  return getCodecCompatibleName(codec, this.appendSource);