hls.js 1.6.0-beta.4.0.canary.11048 → 1.6.0-beta.4.0.canary.11049

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-beta.4.0.canary.11048"}`);
405
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.4.0.canary.11049"}`);
406
406
  } catch (e) {
407
407
  /* log fn threw an exception. All logger methods are no-ops. */
408
408
  return createLogger();
@@ -18256,11 +18256,11 @@ function removeCuesInRange(track, start, end, predicate) {
18256
18256
  }
18257
18257
  }
18258
18258
 
18259
- // Find first cue starting after given time.
18259
+ // Find first cue starting at or after given time.
18260
18260
  // Modified version of binary search O(log(n)).
18261
- function getFirstCueIndexAfterTime(cues, time) {
18262
- // If first cue starts after time, start there
18263
- if (time < cues[0].startTime) {
18261
+ function getFirstCueIndexFromTime(cues, time) {
18262
+ // If first cue starts at or after time, start there
18263
+ if (time <= cues[0].startTime) {
18264
18264
  return 0;
18265
18265
  }
18266
18266
  // If the last cue ends before time there is no overlap
@@ -18270,8 +18270,9 @@ function getFirstCueIndexAfterTime(cues, time) {
18270
18270
  }
18271
18271
  let left = 0;
18272
18272
  let right = len;
18273
+ let mid;
18273
18274
  while (left <= right) {
18274
- const mid = Math.floor((right + left) / 2);
18275
+ mid = Math.floor((right + left) / 2);
18275
18276
  if (time < cues[mid].startTime) {
18276
18277
  right = mid - 1;
18277
18278
  } else if (time > cues[mid].startTime && left < len) {
@@ -18287,7 +18288,7 @@ function getFirstCueIndexAfterTime(cues, time) {
18287
18288
  }
18288
18289
  function getCuesInRange(cues, start, end) {
18289
18290
  const cuesFound = [];
18290
- const firstCueInRange = getFirstCueIndexAfterTime(cues, start);
18291
+ const firstCueInRange = getFirstCueIndexFromTime(cues, start);
18291
18292
  if (firstCueInRange > -1) {
18292
18293
  for (let i = firstCueInRange, len = cues.length; i < len; i++) {
18293
18294
  const cue = cues[i];
@@ -19473,7 +19474,7 @@ function assignTrackIdsByGroup(tracks) {
19473
19474
  });
19474
19475
  }
19475
19476
 
19476
- const version = "1.6.0-beta.4.0.canary.11048";
19477
+ const version = "1.6.0-beta.4.0.canary.11049";
19477
19478
 
19478
19479
  // ensure the worker ends up in the bundle
19479
19480
  // If the worker should not be included this gets aliased to empty.js