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.
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-beta.4.0.canary.11048");
1047
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.4.0.canary.11049");
1048
1048
  } catch (e) {
1049
1049
  /* log fn threw an exception. All logger methods are no-ops. */
1050
1050
  return createLogger();
@@ -18427,11 +18427,11 @@
18427
18427
  }
18428
18428
  }
18429
18429
 
18430
- // Find first cue starting after given time.
18430
+ // Find first cue starting at or after given time.
18431
18431
  // Modified version of binary search O(log(n)).
18432
- function getFirstCueIndexAfterTime(cues, time) {
18433
- // If first cue starts after time, start there
18434
- if (time < cues[0].startTime) {
18432
+ function getFirstCueIndexFromTime(cues, time) {
18433
+ // If first cue starts at or after time, start there
18434
+ if (time <= cues[0].startTime) {
18435
18435
  return 0;
18436
18436
  }
18437
18437
  // If the last cue ends before time there is no overlap
@@ -18441,8 +18441,9 @@
18441
18441
  }
18442
18442
  var left = 0;
18443
18443
  var right = len;
18444
+ var mid;
18444
18445
  while (left <= right) {
18445
- var mid = Math.floor((right + left) / 2);
18446
+ mid = Math.floor((right + left) / 2);
18446
18447
  if (time < cues[mid].startTime) {
18447
18448
  right = mid - 1;
18448
18449
  } else if (time > cues[mid].startTime && left < len) {
@@ -18458,7 +18459,7 @@
18458
18459
  }
18459
18460
  function getCuesInRange(cues, start, end) {
18460
18461
  var cuesFound = [];
18461
- var firstCueInRange = getFirstCueIndexAfterTime(cues, start);
18462
+ var firstCueInRange = getFirstCueIndexFromTime(cues, start);
18462
18463
  if (firstCueInRange > -1) {
18463
18464
  for (var i = firstCueInRange, len = cues.length; i < len; i++) {
18464
18465
  var cue = cues[i];
@@ -20092,7 +20093,7 @@
20092
20093
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
20093
20094
  }
20094
20095
 
20095
- var version = "1.6.0-beta.4.0.canary.11048";
20096
+ var version = "1.6.0-beta.4.0.canary.11049";
20096
20097
 
20097
20098
  // ensure the worker ends up in the bundle
20098
20099
  // If the worker should not be included this gets aliased to empty.js