hls.js 1.6.0-beta.1.0.canary.10810 → 1.6.0-beta.1.0.canary.10811

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.
@@ -400,7 +400,7 @@ function enableLogs(debugConfig, context, id) {
400
400
  // Some browsers don't allow to use bind on console object anyway
401
401
  // fallback to default if needed
402
402
  try {
403
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10810"}`);
403
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10811"}`);
404
404
  } catch (e) {
405
405
  /* log fn threw an exception. All logger methods are no-ops. */
406
406
  return createLogger();
@@ -15297,19 +15297,23 @@ class MP4Remuxer {
15297
15297
  this.videoTrackConfig = undefined;
15298
15298
  }
15299
15299
  getVideoStartPts(videoSamples) {
15300
+ // Get the minimum PTS value relative to the first sample's PTS, normalized for 33-bit wrapping
15300
15301
  let rolloverDetected = false;
15302
+ const firstPts = videoSamples[0].pts;
15301
15303
  const startPTS = videoSamples.reduce((minPTS, sample) => {
15302
- const delta = sample.pts - minPTS;
15304
+ let pts = sample.pts;
15305
+ let delta = pts - minPTS;
15303
15306
  if (delta < -4294967296) {
15304
15307
  // 2^32, see PTSNormalize for reasoning, but we're hitting a rollover here, and we don't want that to impact the timeOffset calculation
15305
15308
  rolloverDetected = true;
15306
- return normalizePts(minPTS, sample.pts);
15307
- } else if (delta > 0) {
15309
+ pts = normalizePts(pts, firstPts);
15310
+ delta = pts - minPTS;
15311
+ }
15312
+ if (delta > 0) {
15308
15313
  return minPTS;
15309
- } else {
15310
- return sample.pts;
15311
15314
  }
15312
- }, videoSamples[0].pts);
15315
+ return pts;
15316
+ }, firstPts);
15313
15317
  if (rolloverDetected) {
15314
15318
  this.logger.debug('PTS rollover detected');
15315
15319
  }
@@ -19142,7 +19146,7 @@ class GapController extends Logger {
19142
19146
  }
19143
19147
  }
19144
19148
 
19145
- const version = "1.6.0-beta.1.0.canary.10810";
19149
+ const version = "1.6.0-beta.1.0.canary.10811";
19146
19150
 
19147
19151
  // ensure the worker ends up in the bundle
19148
19152
  // If the worker should not be included this gets aliased to empty.js