hls.js 1.6.1-0.canary.11104 → 1.6.1-0.canary.11107

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.mjs CHANGED
@@ -523,7 +523,7 @@ function enableLogs(debugConfig, context, id) {
523
523
  // Some browsers don't allow to use bind on console object anyway
524
524
  // fallback to default if needed
525
525
  try {
526
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.1-0.canary.11104"}`);
526
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.1-0.canary.11107"}`);
527
527
  } catch (e) {
528
528
  /* log fn threw an exception. All logger methods are no-ops. */
529
529
  return createLogger();
@@ -10238,7 +10238,7 @@ function requireEventemitter3 () {
10238
10238
  var eventemitter3Exports = requireEventemitter3();
10239
10239
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
10240
10240
 
10241
- const version = "1.6.1-0.canary.11104";
10241
+ const version = "1.6.1-0.canary.11107";
10242
10242
 
10243
10243
  // ensure the worker ends up in the bundle
10244
10244
  // If the worker should not be included this gets aliased to empty.js
@@ -18938,7 +18938,10 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
18938
18938
  if (buffersAppendedTo.length === 0) {
18939
18939
  this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${frag.type} level: ${frag.level} sn: ${frag.sn}`);
18940
18940
  }
18941
- this.blockBuffers(onUnblocked, buffersAppendedTo);
18941
+ this.blockBuffers(onUnblocked, buffersAppendedTo).catch(error => {
18942
+ this.warn(`Fragment buffered callback ${error}`);
18943
+ this.stepOperationQueue(this.sourceBufferTypes);
18944
+ });
18942
18945
  }
18943
18946
  onFragChanged(event, data) {
18944
18947
  this.trimBuffers();
@@ -19431,9 +19434,16 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
19431
19434
  }
19432
19435
  blockUntilOpen(callback) {
19433
19436
  if (this.isUpdating() || this.isQueued()) {
19434
- this.blockBuffers(callback);
19437
+ this.blockBuffers(callback).catch(error => {
19438
+ this.warn(`SourceBuffer blocked callback ${error}`);
19439
+ this.stepOperationQueue(this.sourceBufferTypes);
19440
+ });
19435
19441
  } else {
19436
- callback();
19442
+ try {
19443
+ callback();
19444
+ } catch (error) {
19445
+ this.warn(`Callback run without blocking ${this.operationQueue} ${error}`);
19446
+ }
19437
19447
  }
19438
19448
  }
19439
19449
  isUpdating() {
@@ -19452,8 +19462,7 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
19452
19462
  blockBuffers(onUnblocked, bufferNames = this.sourceBufferTypes) {
19453
19463
  if (!bufferNames.length) {
19454
19464
  this.log('Blocking operation requested, but no SourceBuffers exist');
19455
- Promise.resolve().then(onUnblocked);
19456
- return;
19465
+ return Promise.resolve().then(onUnblocked);
19457
19466
  }
19458
19467
  const {
19459
19468
  operationQueue
@@ -19465,13 +19474,13 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
19465
19474
  if (audioBlocked) {
19466
19475
  this.unblockAudio();
19467
19476
  }
19468
- Promise.all(blockingOperations).then(result => {
19477
+ return Promise.all(blockingOperations).then(result => {
19469
19478
  if (operationQueue !== this.operationQueue) {
19470
19479
  return;
19471
19480
  }
19472
19481
  // logger.debug(`[buffer-controller]: Blocking operation resolved; unblocking ${buffers} SourceBuffer`);
19473
19482
  onUnblocked();
19474
- this.stepOperationQueue(bufferNames);
19483
+ this.stepOperationQueue(this.sourceBufferTypes);
19475
19484
  });
19476
19485
  }
19477
19486
  stepOperationQueue(bufferNames) {