hls.js 1.5.14-0.canary.10448 → 1.5.14-0.canary.10449

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
@@ -430,6 +430,7 @@
430
430
  ErrorDetails["BUFFER_NUDGE_ON_STALL"] = "bufferNudgeOnStall";
431
431
  ErrorDetails["INTERNAL_EXCEPTION"] = "internalException";
432
432
  ErrorDetails["INTERNAL_ABORTED"] = "aborted";
433
+ ErrorDetails["ATTACH_MEDIA_ERROR"] = "attachMediaError";
433
434
  ErrorDetails["UNKNOWN"] = "unknown";
434
435
  return ErrorDetails;
435
436
  }({});
@@ -493,7 +494,7 @@
493
494
  // Some browsers don't allow to use bind on console object anyway
494
495
  // fallback to default if needed
495
496
  try {
496
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10448");
497
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10449");
497
498
  } catch (e) {
498
499
  /* log fn threw an exception. All logger methods are no-ops. */
499
500
  return createLogger();
@@ -19335,7 +19336,7 @@
19335
19336
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
19336
19337
  }
19337
19338
 
19338
- var version = "1.5.14-0.canary.10448";
19339
+ var version = "1.5.14-0.canary.10449";
19339
19340
 
19340
19341
  // ensure the worker ends up in the bundle
19341
19342
  // If the worker should not be included this gets aliased to empty.js
@@ -21399,6 +21400,16 @@
21399
21400
  * Attaches Hls.js to a media element
21400
21401
  */;
21401
21402
  _proto.attachMedia = function attachMedia(media) {
21403
+ if (!media) {
21404
+ var error = new Error("attachMedia failed: media argument is " + media);
21405
+ this.trigger(Events.ERROR, {
21406
+ type: ErrorTypes.OTHER_ERROR,
21407
+ details: ErrorDetails.ATTACH_MEDIA_ERROR,
21408
+ fatal: true,
21409
+ error: error
21410
+ });
21411
+ return;
21412
+ }
21402
21413
  this.logger.log('attachMedia');
21403
21414
  this._media = media;
21404
21415
  this.trigger(Events.MEDIA_ATTACHING, {