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.
@@ -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();
@@ -10317,7 +10317,10 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
10317
10317
  if (buffersAppendedTo.length === 0) {
10318
10318
  this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${frag.type} level: ${frag.level} sn: ${frag.sn}`);
10319
10319
  }
10320
- this.blockBuffers(onUnblocked, buffersAppendedTo);
10320
+ this.blockBuffers(onUnblocked, buffersAppendedTo).catch(error => {
10321
+ this.warn(`Fragment buffered callback ${error}`);
10322
+ this.stepOperationQueue(this.sourceBufferTypes);
10323
+ });
10321
10324
  }
10322
10325
  onFragChanged(event, data) {
10323
10326
  this.trimBuffers();
@@ -10810,9 +10813,16 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
10810
10813
  }
10811
10814
  blockUntilOpen(callback) {
10812
10815
  if (this.isUpdating() || this.isQueued()) {
10813
- this.blockBuffers(callback);
10816
+ this.blockBuffers(callback).catch(error => {
10817
+ this.warn(`SourceBuffer blocked callback ${error}`);
10818
+ this.stepOperationQueue(this.sourceBufferTypes);
10819
+ });
10814
10820
  } else {
10815
- callback();
10821
+ try {
10822
+ callback();
10823
+ } catch (error) {
10824
+ this.warn(`Callback run without blocking ${this.operationQueue} ${error}`);
10825
+ }
10816
10826
  }
10817
10827
  }
10818
10828
  isUpdating() {
@@ -10831,8 +10841,7 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
10831
10841
  blockBuffers(onUnblocked, bufferNames = this.sourceBufferTypes) {
10832
10842
  if (!bufferNames.length) {
10833
10843
  this.log('Blocking operation requested, but no SourceBuffers exist');
10834
- Promise.resolve().then(onUnblocked);
10835
- return;
10844
+ return Promise.resolve().then(onUnblocked);
10836
10845
  }
10837
10846
  const {
10838
10847
  operationQueue
@@ -10844,13 +10853,13 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => key === 'initSeg
10844
10853
  if (audioBlocked) {
10845
10854
  this.unblockAudio();
10846
10855
  }
10847
- Promise.all(blockingOperations).then(result => {
10856
+ return Promise.all(blockingOperations).then(result => {
10848
10857
  if (operationQueue !== this.operationQueue) {
10849
10858
  return;
10850
10859
  }
10851
10860
  // logger.debug(`[buffer-controller]: Blocking operation resolved; unblocking ${buffers} SourceBuffer`);
10852
10861
  onUnblocked();
10853
- this.stepOperationQueue(bufferNames);
10862
+ this.stepOperationQueue(this.sourceBufferTypes);
10854
10863
  });
10855
10864
  }
10856
10865
  stepOperationQueue(bufferNames) {
@@ -19793,7 +19802,7 @@ function assignTrackIdsByGroup(tracks) {
19793
19802
  });
19794
19803
  }
19795
19804
 
19796
- const version = "1.6.1-0.canary.11104";
19805
+ const version = "1.6.1-0.canary.11107";
19797
19806
 
19798
19807
  // ensure the worker ends up in the bundle
19799
19808
  // If the worker should not be included this gets aliased to empty.js