hls.js 1.6.1-0.canary.11107 → 1.6.1-0.canary.11108

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
@@ -1165,7 +1165,7 @@
1165
1165
  // Some browsers don't allow to use bind on console object anyway
1166
1166
  // fallback to default if needed
1167
1167
  try {
1168
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.1-0.canary.11107");
1168
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.1-0.canary.11108");
1169
1169
  } catch (e) {
1170
1170
  /* log fn threw an exception. All logger methods are no-ops. */
1171
1171
  return createLogger();
@@ -2001,8 +2001,10 @@
2001
2001
  {
2002
2002
  // extract profile + compatibility + level out of avcC box
2003
2003
  var avcCBox = findBox(sampleEntriesEnd, ['avcC'])[0];
2004
- codec += '.' + toHex(avcCBox[1]) + toHex(avcCBox[2]) + toHex(avcCBox[3]);
2005
- supplemental = parseSupplementalDoViCodec(codecFourCC === 'avc1' ? 'dva1' : 'dvav', sampleEntriesEnd);
2004
+ if (avcCBox && avcCBox.length > 3) {
2005
+ codec += '.' + toHex(avcCBox[1]) + toHex(avcCBox[2]) + toHex(avcCBox[3]);
2006
+ supplemental = parseSupplementalDoViCodec(codecFourCC === 'avc1' ? 'dva1' : 'dvav', sampleEntriesEnd);
2007
+ }
2006
2008
  break;
2007
2009
  }
2008
2010
  case 'mp4a':
@@ -2053,9 +2055,8 @@
2053
2055
  case 'hvc1':
2054
2056
  case 'hev1':
2055
2057
  {
2056
- var hvcCBoxes = findBox(sampleEntriesEnd, ['hvcC']);
2057
- if (hvcCBoxes) {
2058
- var hvcCBox = hvcCBoxes[0];
2058
+ var hvcCBox = findBox(sampleEntriesEnd, ['hvcC'])[0];
2059
+ if (hvcCBox && hvcCBox.length > 12) {
2059
2060
  var profileByte = hvcCBox[1];
2060
2061
  var profileSpace = ['', 'A', 'B', 'C'][profileByte >> 6];
2061
2062
  var generalProfileIdc = profileByte & 0x1f;
@@ -2091,34 +2092,38 @@
2091
2092
  case 'vp09':
2092
2093
  {
2093
2094
  var vpcCBox = findBox(sampleEntriesEnd, ['vpcC'])[0];
2094
- var profile = vpcCBox[4];
2095
- var level = vpcCBox[5];
2096
- var bitDepth = vpcCBox[6] >> 4 & 0x0f;
2097
- codec += '.' + addLeadingZero(profile) + '.' + addLeadingZero(level) + '.' + addLeadingZero(bitDepth);
2095
+ if (vpcCBox && vpcCBox.length > 6) {
2096
+ var profile = vpcCBox[4];
2097
+ var level = vpcCBox[5];
2098
+ var bitDepth = vpcCBox[6] >> 4 & 0x0f;
2099
+ codec += '.' + addLeadingZero(profile) + '.' + addLeadingZero(level) + '.' + addLeadingZero(bitDepth);
2100
+ }
2098
2101
  break;
2099
2102
  }
2100
2103
  case 'av01':
2101
2104
  {
2102
2105
  var av1CBox = findBox(sampleEntriesEnd, ['av1C'])[0];
2103
- var _profile = av1CBox[1] >>> 5;
2104
- var _level = av1CBox[1] & 0x1f;
2105
- var _tierFlag = av1CBox[2] >>> 7 ? 'H' : 'M';
2106
- var highBitDepth = (av1CBox[2] & 0x40) >> 6;
2107
- var twelveBit = (av1CBox[2] & 0x20) >> 5;
2108
- var _bitDepth = _profile === 2 && highBitDepth ? twelveBit ? 12 : 10 : highBitDepth ? 10 : 8;
2109
- var monochrome = (av1CBox[2] & 0x10) >> 4;
2110
- var chromaSubsamplingX = (av1CBox[2] & 0x08) >> 3;
2111
- var chromaSubsamplingY = (av1CBox[2] & 0x04) >> 2;
2112
- var chromaSamplePosition = av1CBox[2] & 0x03;
2113
- // TODO: parse color_description_present_flag
2114
- // default it to BT.709/limited range for now
2115
- // more info https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax
2116
- var colorPrimaries = 1;
2117
- var transferCharacteristics = 1;
2118
- var matrixCoefficients = 1;
2119
- var videoFullRangeFlag = 0;
2120
- codec += '.' + _profile + '.' + addLeadingZero(_level) + _tierFlag + '.' + addLeadingZero(_bitDepth) + '.' + monochrome + '.' + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition + '.' + addLeadingZero(colorPrimaries) + '.' + addLeadingZero(transferCharacteristics) + '.' + addLeadingZero(matrixCoefficients) + '.' + videoFullRangeFlag;
2121
- supplemental = parseSupplementalDoViCodec('dav1', sampleEntriesEnd);
2106
+ if (av1CBox && av1CBox.length > 2) {
2107
+ var _profile = av1CBox[1] >>> 5;
2108
+ var _level = av1CBox[1] & 0x1f;
2109
+ var _tierFlag = av1CBox[2] >>> 7 ? 'H' : 'M';
2110
+ var highBitDepth = (av1CBox[2] & 0x40) >> 6;
2111
+ var twelveBit = (av1CBox[2] & 0x20) >> 5;
2112
+ var _bitDepth = _profile === 2 && highBitDepth ? twelveBit ? 12 : 10 : highBitDepth ? 10 : 8;
2113
+ var monochrome = (av1CBox[2] & 0x10) >> 4;
2114
+ var chromaSubsamplingX = (av1CBox[2] & 0x08) >> 3;
2115
+ var chromaSubsamplingY = (av1CBox[2] & 0x04) >> 2;
2116
+ var chromaSamplePosition = av1CBox[2] & 0x03;
2117
+ // TODO: parse color_description_present_flag
2118
+ // default it to BT.709/limited range for now
2119
+ // more info https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax
2120
+ var colorPrimaries = 1;
2121
+ var transferCharacteristics = 1;
2122
+ var matrixCoefficients = 1;
2123
+ var videoFullRangeFlag = 0;
2124
+ codec += '.' + _profile + '.' + addLeadingZero(_level) + _tierFlag + '.' + addLeadingZero(_bitDepth) + '.' + monochrome + '.' + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition + '.' + addLeadingZero(colorPrimaries) + '.' + addLeadingZero(transferCharacteristics) + '.' + addLeadingZero(matrixCoefficients) + '.' + videoFullRangeFlag;
2125
+ supplemental = parseSupplementalDoViCodec('dav1', sampleEntriesEnd);
2126
+ }
2122
2127
  break;
2123
2128
  }
2124
2129
  }
@@ -20424,7 +20429,7 @@
20424
20429
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
20425
20430
  }
20426
20431
 
20427
- var version = "1.6.1-0.canary.11107";
20432
+ var version = "1.6.1-0.canary.11108";
20428
20433
 
20429
20434
  // ensure the worker ends up in the bundle
20430
20435
  // If the worker should not be included this gets aliased to empty.js