hls.js 1.6.6-0.canary.11355 → 1.6.6

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.js CHANGED
@@ -1165,7 +1165,7 @@
1165
1165
  // Some browsers don't allow to use bind on console object anyway
1166
1166
  // fallback to default if needed
1167
1167
  try {
1168
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6-0.canary.11355");
1168
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6");
1169
1169
  } catch (e) {
1170
1170
  /* log fn threw an exception. All logger methods are no-ops. */
1171
1171
  return createLogger();
@@ -16725,7 +16725,7 @@
16725
16725
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16726
16726
  }
16727
16727
 
16728
- var version = "1.6.6-0.canary.11355";
16728
+ var version = "1.6.6";
16729
16729
 
16730
16730
  // ensure the worker ends up in the bundle
16731
16731
  // If the worker should not be included this gets aliased to empty.js
@@ -17685,7 +17685,9 @@
17685
17685
  if (data.parent !== 'audio') {
17686
17686
  return;
17687
17687
  }
17688
- this.resetLoadingState();
17688
+ if (!this.reduceLengthAndFlushBuffer(data)) {
17689
+ this.resetLoadingState();
17690
+ }
17689
17691
  break;
17690
17692
  case ErrorDetails.BUFFER_FULL_ERROR:
17691
17693
  if (data.parent !== 'audio') {
@@ -19329,7 +19331,7 @@
19329
19331
  }
19330
19332
 
19331
19333
  // Block audio append until overlapping video append
19332
- var videoTrack = this.tracks.video;
19334
+ var videoTrack = tracks.video;
19333
19335
  var videoSb = videoTrack == null ? void 0 : videoTrack.buffer;
19334
19336
  if (videoSb && sn !== 'initSegment') {
19335
19337
  var partOrFrag = part || frag;
@@ -19361,16 +19363,14 @@
19361
19363
  var operation = {
19362
19364
  label: "append-" + type,
19363
19365
  execute: function execute() {
19366
+ var _this10$tracks$type;
19364
19367
  chunkStats.executeStart = self.performance.now();
19365
- var track = _this10.tracks[type];
19366
- if (track) {
19367
- var sb = track.buffer;
19368
- if (sb) {
19369
- if (checkTimestampOffset) {
19370
- _this10.updateTimestampOffset(sb, fragStart, 0.1, type, sn, cc);
19371
- } else if (offset !== undefined && isFiniteNumber(offset)) {
19372
- _this10.updateTimestampOffset(sb, offset, 0.000001, type, sn, cc);
19373
- }
19368
+ var sb = (_this10$tracks$type = _this10.tracks[type]) == null ? void 0 : _this10$tracks$type.buffer;
19369
+ if (sb) {
19370
+ if (checkTimestampOffset) {
19371
+ _this10.updateTimestampOffset(sb, fragStart, 0.1, type, sn, cc);
19372
+ } else if (offset !== undefined && isFiniteNumber(offset)) {
19373
+ _this10.updateTimestampOffset(sb, offset, 0.000001, type, sn, cc);
19374
19374
  }
19375
19375
  }
19376
19376
  _this10.appendExecutor(data, type);
@@ -19428,7 +19428,7 @@
19428
19428
  fatal: false
19429
19429
  };
19430
19430
  var mediaError = (_this10$media = _this10.media) == null ? void 0 : _this10$media.error;
19431
- if (error.code === DOMException.QUOTA_EXCEEDED_ERR) {
19431
+ if (error.code === DOMException.QUOTA_EXCEEDED_ERR || error.name == 'QuotaExceededError' || "quota" in error) {
19432
19432
  // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
19433
19433
  // let's stop appending any segments, and report BUFFER_FULL_ERROR error
19434
19434
  event.details = ErrorDetails.BUFFER_FULL_ERROR;
@@ -21985,7 +21985,11 @@
21985
21985
  this.updatePathwayPriority(pathwayPriority);
21986
21986
  errorAction.resolved = this.pathwayId !== errorPathway;
21987
21987
  }
21988
- if (!errorAction.resolved) {
21988
+ if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && !data.fatal) {
21989
+ // Error will become fatal in buffer-controller when reaching `appendErrorMaxRetry`
21990
+ // Stream-controllers are expected to reduce buffer length even if this is not deemed a QuotaExceededError
21991
+ errorAction.resolved = true;
21992
+ } else if (!errorAction.resolved) {
21989
21993
  this.warn("Could not resolve " + data.details + " (\"" + data.error.message + "\") with content-steering for Pathway: " + errorPathway + " levels: " + (levels ? levels.length : levels) + " priorities: " + stringify(pathwayPriority) + " penalized: " + stringify(this.penalizedPathways));
21990
21994
  }
21991
21995
  }
@@ -34147,7 +34151,9 @@
34147
34151
  if (data.parent !== 'main') {
34148
34152
  return;
34149
34153
  }
34150
- this.resetLoadingState();
34154
+ if (this.reduceLengthAndFlushBuffer(data)) {
34155
+ this.resetLoadingState();
34156
+ }
34151
34157
  break;
34152
34158
  case ErrorDetails.BUFFER_FULL_ERROR:
34153
34159
  if (data.parent !== 'main') {