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

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.11077");
1047
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11078");
1048
1048
  } catch (e) {
1049
1049
  /* log fn threw an exception. All logger methods are no-ops. */
1050
1050
  return createLogger();
@@ -1809,16 +1809,27 @@
1809
1809
  }[hdlrType];
1810
1810
  if (type) {
1811
1811
  // Parse codec details
1812
- var stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
1813
- var stsdData = parseStsd(stsd);
1814
- result[trackId] = {
1815
- timescale: timescale,
1816
- type: type
1817
- };
1818
- result[type] = _objectSpread2({
1819
- timescale: timescale,
1820
- id: trackId
1821
- }, stsdData);
1812
+ var stsdBox = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
1813
+ var stsd = parseStsd(stsdBox);
1814
+ if (type) {
1815
+ // Add 'audio', 'video', and 'audiovideo' track records that will map to SourceBuffers
1816
+ result[trackId] = {
1817
+ timescale: timescale,
1818
+ type: type,
1819
+ stsd: stsd
1820
+ };
1821
+ result[type] = _objectSpread2({
1822
+ timescale: timescale,
1823
+ id: trackId
1824
+ }, stsd);
1825
+ } else {
1826
+ // Add 'meta' and other track records required by `offsetStartDTS`
1827
+ result[trackId] = {
1828
+ timescale: timescale,
1829
+ type: hdlrType,
1830
+ stsd: stsd
1831
+ };
1832
+ }
1822
1833
  }
1823
1834
  }
1824
1835
  }
@@ -2270,6 +2281,8 @@
2270
2281
  }
2271
2282
  return duration;
2272
2283
  }
2284
+
2285
+ // TODO: Remove `offsetStartDTS` in favor of using `timestampOffset` (issue #5715)
2273
2286
  function offsetStartDTS(initData, fmp4, timeOffset) {
2274
2287
  findBox(fmp4, ['moof', 'traf']).forEach(function (traf) {
2275
2288
  findBox(traf, ['tfhd']).forEach(function (tfhd) {
@@ -20240,7 +20253,7 @@
20240
20253
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
20241
20254
  }
20242
20255
 
20243
- var version = "1.6.0-rc.1.0.canary.11077";
20256
+ var version = "1.6.0-rc.1.0.canary.11078";
20244
20257
 
20245
20258
  // ensure the worker ends up in the bundle
20246
20259
  // If the worker should not be included this gets aliased to empty.js