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

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
@@ -1194,7 +1194,7 @@
1194
1194
  // Some browsers don't allow to use bind on console object anyway
1195
1195
  // fallback to default if needed
1196
1196
  try {
1197
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.1-0.canary.11107");
1197
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.1-0.canary.11110");
1198
1198
  } catch (e) {
1199
1199
  /* log fn threw an exception. All logger methods are no-ops. */
1200
1200
  return createLogger();
@@ -2037,8 +2037,10 @@
2037
2037
  {
2038
2038
  // extract profile + compatibility + level out of avcC box
2039
2039
  var avcCBox = findBox(sampleEntriesEnd, ['avcC'])[0];
2040
- codec += '.' + toHex(avcCBox[1]) + toHex(avcCBox[2]) + toHex(avcCBox[3]);
2041
- supplemental = parseSupplementalDoViCodec(codecFourCC === 'avc1' ? 'dva1' : 'dvav', sampleEntriesEnd);
2040
+ if (avcCBox && avcCBox.length > 3) {
2041
+ codec += '.' + toHex(avcCBox[1]) + toHex(avcCBox[2]) + toHex(avcCBox[3]);
2042
+ supplemental = parseSupplementalDoViCodec(codecFourCC === 'avc1' ? 'dva1' : 'dvav', sampleEntriesEnd);
2043
+ }
2042
2044
  break;
2043
2045
  }
2044
2046
  case 'mp4a':
@@ -2089,9 +2091,8 @@
2089
2091
  case 'hvc1':
2090
2092
  case 'hev1':
2091
2093
  {
2092
- var hvcCBoxes = findBox(sampleEntriesEnd, ['hvcC']);
2093
- if (hvcCBoxes) {
2094
- var hvcCBox = hvcCBoxes[0];
2094
+ var hvcCBox = findBox(sampleEntriesEnd, ['hvcC'])[0];
2095
+ if (hvcCBox && hvcCBox.length > 12) {
2095
2096
  var profileByte = hvcCBox[1];
2096
2097
  var profileSpace = ['', 'A', 'B', 'C'][profileByte >> 6];
2097
2098
  var generalProfileIdc = profileByte & 0x1f;
@@ -2127,34 +2128,38 @@
2127
2128
  case 'vp09':
2128
2129
  {
2129
2130
  var vpcCBox = findBox(sampleEntriesEnd, ['vpcC'])[0];
2130
- var profile = vpcCBox[4];
2131
- var level = vpcCBox[5];
2132
- var bitDepth = vpcCBox[6] >> 4 & 0x0f;
2133
- codec += '.' + addLeadingZero(profile) + '.' + addLeadingZero(level) + '.' + addLeadingZero(bitDepth);
2131
+ if (vpcCBox && vpcCBox.length > 6) {
2132
+ var profile = vpcCBox[4];
2133
+ var level = vpcCBox[5];
2134
+ var bitDepth = vpcCBox[6] >> 4 & 0x0f;
2135
+ codec += '.' + addLeadingZero(profile) + '.' + addLeadingZero(level) + '.' + addLeadingZero(bitDepth);
2136
+ }
2134
2137
  break;
2135
2138
  }
2136
2139
  case 'av01':
2137
2140
  {
2138
2141
  var av1CBox = findBox(sampleEntriesEnd, ['av1C'])[0];
2139
- var _profile = av1CBox[1] >>> 5;
2140
- var _level = av1CBox[1] & 0x1f;
2141
- var _tierFlag = av1CBox[2] >>> 7 ? 'H' : 'M';
2142
- var highBitDepth = (av1CBox[2] & 0x40) >> 6;
2143
- var twelveBit = (av1CBox[2] & 0x20) >> 5;
2144
- var _bitDepth = _profile === 2 && highBitDepth ? twelveBit ? 12 : 10 : highBitDepth ? 10 : 8;
2145
- var monochrome = (av1CBox[2] & 0x10) >> 4;
2146
- var chromaSubsamplingX = (av1CBox[2] & 0x08) >> 3;
2147
- var chromaSubsamplingY = (av1CBox[2] & 0x04) >> 2;
2148
- var chromaSamplePosition = av1CBox[2] & 0x03;
2149
- // TODO: parse color_description_present_flag
2150
- // default it to BT.709/limited range for now
2151
- // more info https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax
2152
- var colorPrimaries = 1;
2153
- var transferCharacteristics = 1;
2154
- var matrixCoefficients = 1;
2155
- var videoFullRangeFlag = 0;
2156
- codec += '.' + _profile + '.' + addLeadingZero(_level) + _tierFlag + '.' + addLeadingZero(_bitDepth) + '.' + monochrome + '.' + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition + '.' + addLeadingZero(colorPrimaries) + '.' + addLeadingZero(transferCharacteristics) + '.' + addLeadingZero(matrixCoefficients) + '.' + videoFullRangeFlag;
2157
- supplemental = parseSupplementalDoViCodec('dav1', sampleEntriesEnd);
2142
+ if (av1CBox && av1CBox.length > 2) {
2143
+ var _profile = av1CBox[1] >>> 5;
2144
+ var _level = av1CBox[1] & 0x1f;
2145
+ var _tierFlag = av1CBox[2] >>> 7 ? 'H' : 'M';
2146
+ var highBitDepth = (av1CBox[2] & 0x40) >> 6;
2147
+ var twelveBit = (av1CBox[2] & 0x20) >> 5;
2148
+ var _bitDepth = _profile === 2 && highBitDepth ? twelveBit ? 12 : 10 : highBitDepth ? 10 : 8;
2149
+ var monochrome = (av1CBox[2] & 0x10) >> 4;
2150
+ var chromaSubsamplingX = (av1CBox[2] & 0x08) >> 3;
2151
+ var chromaSubsamplingY = (av1CBox[2] & 0x04) >> 2;
2152
+ var chromaSamplePosition = av1CBox[2] & 0x03;
2153
+ // TODO: parse color_description_present_flag
2154
+ // default it to BT.709/limited range for now
2155
+ // more info https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax
2156
+ var colorPrimaries = 1;
2157
+ var transferCharacteristics = 1;
2158
+ var matrixCoefficients = 1;
2159
+ var videoFullRangeFlag = 0;
2160
+ codec += '.' + _profile + '.' + addLeadingZero(_level) + _tierFlag + '.' + addLeadingZero(_bitDepth) + '.' + monochrome + '.' + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition + '.' + addLeadingZero(colorPrimaries) + '.' + addLeadingZero(transferCharacteristics) + '.' + addLeadingZero(matrixCoefficients) + '.' + videoFullRangeFlag;
2161
+ supplemental = parseSupplementalDoViCodec('dav1', sampleEntriesEnd);
2162
+ }
2158
2163
  break;
2159
2164
  }
2160
2165
  }
@@ -16716,7 +16721,7 @@
16716
16721
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16717
16722
  }
16718
16723
 
16719
- var version = "1.6.1-0.canary.11107";
16724
+ var version = "1.6.1-0.canary.11110";
16720
16725
 
16721
16726
  // ensure the worker ends up in the bundle
16722
16727
  // If the worker should not be included this gets aliased to empty.js