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.
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, context, id) {
402
402
  // Some browsers don't allow to use bind on console object anyway
403
403
  // fallback to default if needed
404
404
  try {
405
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.1.0.canary.11077"}`);
405
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.1.0.canary.11078"}`);
406
406
  } catch (e) {
407
407
  /* log fn threw an exception. All logger methods are no-ops. */
408
408
  return createLogger();
@@ -1310,16 +1310,27 @@ function parseInitSegment(initSegment) {
1310
1310
  }[hdlrType];
1311
1311
  if (type) {
1312
1312
  // Parse codec details
1313
- const stsd = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
1314
- const stsdData = parseStsd(stsd);
1315
- result[trackId] = {
1316
- timescale,
1317
- type
1318
- };
1319
- result[type] = _objectSpread2({
1320
- timescale,
1321
- id: trackId
1322
- }, stsdData);
1313
+ const stsdBox = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
1314
+ const stsd = parseStsd(stsdBox);
1315
+ if (type) {
1316
+ // Add 'audio', 'video', and 'audiovideo' track records that will map to SourceBuffers
1317
+ result[trackId] = {
1318
+ timescale,
1319
+ type,
1320
+ stsd
1321
+ };
1322
+ result[type] = _objectSpread2({
1323
+ timescale,
1324
+ id: trackId
1325
+ }, stsd);
1326
+ } else {
1327
+ // Add 'meta' and other track records required by `offsetStartDTS`
1328
+ result[trackId] = {
1329
+ timescale,
1330
+ type: hdlrType,
1331
+ stsd
1332
+ };
1333
+ }
1323
1334
  }
1324
1335
  }
1325
1336
  }
@@ -1767,6 +1778,8 @@ function computeRawDurationFromSamples(trun) {
1767
1778
  }
1768
1779
  return duration;
1769
1780
  }
1781
+
1782
+ // TODO: Remove `offsetStartDTS` in favor of using `timestampOffset` (issue #5715)
1770
1783
  function offsetStartDTS(initData, fmp4, timeOffset) {
1771
1784
  findBox(fmp4, ['moof', 'traf']).forEach(traf => {
1772
1785
  findBox(traf, ['tfhd']).forEach(tfhd => {
@@ -19624,7 +19637,7 @@ function assignTrackIdsByGroup(tracks) {
19624
19637
  });
19625
19638
  }
19626
19639
 
19627
- const version = "1.6.0-rc.1.0.canary.11077";
19640
+ const version = "1.6.0-rc.1.0.canary.11078";
19628
19641
 
19629
19642
  // ensure the worker ends up in the bundle
19630
19643
  // If the worker should not be included this gets aliased to empty.js