hls.js 1.6.0-beta.2.0.canary.10837 → 1.6.0-beta.2.0.canary.10842

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.
@@ -401,7 +401,7 @@ function enableLogs(debugConfig, context, id) {
401
401
  // Some browsers don't allow to use bind on console object anyway
402
402
  // fallback to default if needed
403
403
  try {
404
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.2.0.canary.10837"}`);
404
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.2.0.canary.10842"}`);
405
405
  } catch (e) {
406
406
  /* log fn threw an exception. All logger methods are no-ops. */
407
407
  return createLogger();
@@ -10075,7 +10075,7 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
10075
10075
  this.hls.trigger(Events.LIVE_BACK_BUFFER_REACHED, {
10076
10076
  bufferEnd: targetBackBufferPosition
10077
10077
  });
10078
- } else if (track != null && track.ended && buffered.end(buffered.length - 1) - currentTime < targetDuration * 2) {
10078
+ } else if (track != null && track.ended) {
10079
10079
  this.log(`Cannot flush ${type} back buffer while SourceBuffer is in ended state`);
10080
10080
  return;
10081
10081
  }
@@ -10099,13 +10099,9 @@ transfer tracks: ${JSON.stringify(transferredTracks, (key, value) => key === 'in
10099
10099
  }
10100
10100
  const bufferStart = buffered.start(numBufferedRanges - 1);
10101
10101
  const bufferEnd = buffered.end(numBufferedRanges - 1);
10102
- const track = this.tracks[type];
10103
10102
  // No flush if we can tolerate the current buffer length or the current buffer range we would flush is contiguous with current position
10104
10103
  if (targetFrontBufferPosition > bufferStart || currentTime >= bufferStart && currentTime <= bufferEnd) {
10105
10104
  return;
10106
- } else if (track != null && track.ended && currentTime - bufferEnd < 2 * targetDuration) {
10107
- this.log(`Cannot flush ${type} front buffer while SourceBuffer is in ended state`);
10108
- return;
10109
10105
  }
10110
10106
  this.hls.trigger(Events.BUFFER_FLUSHING, {
10111
10107
  startOffset: bufferStart,
@@ -19180,7 +19176,7 @@ class GapController extends Logger {
19180
19176
  }
19181
19177
  }
19182
19178
 
19183
- const version = "1.6.0-beta.2.0.canary.10837";
19179
+ const version = "1.6.0-beta.2.0.canary.10842";
19184
19180
 
19185
19181
  // ensure the worker ends up in the bundle
19186
19182
  // If the worker should not be included this gets aliased to empty.js
@@ -20398,7 +20394,7 @@ class StreamController extends BaseStreamController {
20398
20394
  onBufferFlushed(event, {
20399
20395
  type
20400
20396
  }) {
20401
- if (type !== ElementaryStreamTypes.AUDIO || this.audioOnly && !this.altAudio) {
20397
+ if (type !== ElementaryStreamTypes.AUDIO || !this.altAudio) {
20402
20398
  const mediaBuffer = (type === ElementaryStreamTypes.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media;
20403
20399
  this.afterBufferFlushed(mediaBuffer, type, PlaylistLevelType.MAIN);
20404
20400
  this.tick();