hls.js 1.6.0-rc.1.0.canary.11074 → 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.light.js CHANGED
@@ -1044,7 +1044,7 @@
1044
1044
  // Some browsers don't allow to use bind on console object anyway
1045
1045
  // fallback to default if needed
1046
1046
  try {
1047
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11074");
1047
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11077");
1048
1048
  } catch (e) {
1049
1049
  /* log fn threw an exception. All logger methods are no-ops. */
1050
1050
  return createLogger();
@@ -2870,6 +2870,21 @@
2870
2870
  return getCodecCompatibleNameLower(m.toLowerCase(), preferManagedMediaSource);
2871
2871
  });
2872
2872
  }
2873
+ function replaceVideoCodec(originalCodecs, newVideoCodec) {
2874
+ var codecs = [];
2875
+ if (originalCodecs) {
2876
+ var allCodecs = originalCodecs.split(',');
2877
+ for (var i = 0; i < allCodecs.length; i++) {
2878
+ if (!isCodecType(allCodecs[i], 'video')) {
2879
+ codecs.push(allCodecs[i]);
2880
+ }
2881
+ }
2882
+ }
2883
+ if (newVideoCodec) {
2884
+ codecs.push(newVideoCodec);
2885
+ }
2886
+ return codecs.join(',');
2887
+ }
2873
2888
  function pickMostCompleteCodecName(parsedCodec, levelCodec) {
2874
2889
  // Parsing of mp4a codecs strings in mp4-tools from media is incomplete as of d8c6c7a
2875
2890
  // so use level codec is parsed codec is unavailable or incomplete
@@ -6201,10 +6216,11 @@
6201
6216
  _proto.getTrackCodec = function getTrackCodec(track, trackName) {
6202
6217
  // Use supplemental video codec when supported when adding SourceBuffer (#5558)
6203
6218
  var supplementalCodec = track.supplemental;
6204
- if (supplementalCodec && trackName === 'video' && areCodecsMediaSourceSupported(supplementalCodec, trackName)) {
6205
- return supplementalCodec;
6219
+ var trackCodec = track.codec;
6220
+ if (supplementalCodec && (trackName === 'video' || trackName === 'audiovideo') && areCodecsMediaSourceSupported(supplementalCodec, 'video')) {
6221
+ trackCodec = replaceVideoCodec(trackCodec, supplementalCodec);
6206
6222
  }
6207
- var codec = pickMostCompleteCodecName(track.codec, track.levelCodec);
6223
+ var codec = pickMostCompleteCodecName(trackCodec, track.levelCodec);
6208
6224
  if (codec) {
6209
6225
  if (trackName.slice(0, 5) === 'audio') {
6210
6226
  return getCodecCompatibleName(codec, this.appendSource);
@@ -14001,6 +14017,7 @@
14001
14017
  tracks.audiovideo = {
14002
14018
  container: 'video/mp4',
14003
14019
  codec: audioCodec + ',' + videoCodec,
14020
+ supplemental: initData.video.supplemental,
14004
14021
  initSegment: initSegment,
14005
14022
  id: 'main'
14006
14023
  };
@@ -20223,7 +20240,7 @@
20223
20240
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
20224
20241
  }
20225
20242
 
20226
- var version = "1.6.0-rc.1.0.canary.11074";
20243
+ var version = "1.6.0-rc.1.0.canary.11077";
20227
20244
 
20228
20245
  // ensure the worker ends up in the bundle
20229
20246
  // If the worker should not be included this gets aliased to empty.js