hls.js 1.5.14-0.canary.10446 → 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.mjs CHANGED
@@ -355,6 +355,7 @@ let ErrorDetails = /*#__PURE__*/function (ErrorDetails) {
355
355
  ErrorDetails["BUFFER_NUDGE_ON_STALL"] = "bufferNudgeOnStall";
356
356
  ErrorDetails["INTERNAL_EXCEPTION"] = "internalException";
357
357
  ErrorDetails["INTERNAL_ABORTED"] = "aborted";
358
+ ErrorDetails["ATTACH_MEDIA_ERROR"] = "attachMediaError";
358
359
  ErrorDetails["UNKNOWN"] = "unknown";
359
360
  return ErrorDetails;
360
361
  }({});
@@ -420,7 +421,7 @@ function enableLogs(debugConfig, context, id) {
420
421
  // Some browsers don't allow to use bind on console object anyway
421
422
  // fallback to default if needed
422
423
  try {
423
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10446"}`);
424
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10449"}`);
424
425
  } catch (e) {
425
426
  /* log fn threw an exception. All logger methods are no-ops. */
426
427
  return createLogger();
@@ -11032,7 +11033,7 @@ function concatUint8Arrays(chunks, dataLength) {
11032
11033
  return result;
11033
11034
  }
11034
11035
 
11035
- const version = "1.5.14-0.canary.10446";
11036
+ const version = "1.5.14-0.canary.10449";
11036
11037
 
11037
11038
  // ensure the worker ends up in the bundle
11038
11039
  // If the worker should not be included this gets aliased to empty.js
@@ -29578,6 +29579,16 @@ class Hls {
29578
29579
  * Attaches Hls.js to a media element
29579
29580
  */
29580
29581
  attachMedia(media) {
29582
+ if (!media) {
29583
+ const error = new Error(`attachMedia failed: media argument is ${media}`);
29584
+ this.trigger(Events.ERROR, {
29585
+ type: ErrorTypes.OTHER_ERROR,
29586
+ details: ErrorDetails.ATTACH_MEDIA_ERROR,
29587
+ fatal: true,
29588
+ error
29589
+ });
29590
+ return;
29591
+ }
29581
29592
  this.logger.log('attachMedia');
29582
29593
  this._media = media;
29583
29594
  this.trigger(Events.MEDIA_ATTACHING, {