hls.js 1.6.0-beta.1.0.canary.10748 → 1.6.0-beta.1.0.canary.10749

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
@@ -28,6 +28,9 @@ let ErrorDetails = /*#__PURE__*/function (ErrorDetails) {
28
28
  ErrorDetails["KEY_SYSTEM_SESSION_UPDATE_FAILED"] = "keySystemSessionUpdateFailed";
29
29
  ErrorDetails["KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED"] = "keySystemStatusOutputRestricted";
30
30
  ErrorDetails["KEY_SYSTEM_STATUS_INTERNAL_ERROR"] = "keySystemStatusInternalError";
31
+ ErrorDetails["KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR"] = "keySystemDestroyMediaKeysError";
32
+ ErrorDetails["KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR"] = "keySystemDestroyCloseSessionError";
33
+ ErrorDetails["KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR"] = "keySystemDestroyRemoveSessionError";
31
34
  ErrorDetails["MANIFEST_LOAD_ERROR"] = "manifestLoadError";
32
35
  ErrorDetails["MANIFEST_LOAD_TIMEOUT"] = "manifestLoadTimeOut";
33
36
  ErrorDetails["MANIFEST_PARSING_ERROR"] = "manifestParsingError";
@@ -397,7 +400,7 @@ function enableLogs(debugConfig, context, id) {
397
400
  // Some browsers don't allow to use bind on console object anyway
398
401
  // fallback to default if needed
399
402
  try {
400
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10748"}`);
403
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10749"}`);
401
404
  } catch (e) {
402
405
  /* log fn threw an exception. All logger methods are no-ops. */
403
406
  return createLogger();
@@ -9726,7 +9729,7 @@ var eventemitter3 = {exports: {}};
9726
9729
  var eventemitter3Exports = eventemitter3.exports;
9727
9730
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
9728
9731
 
9729
- const version = "1.6.0-beta.1.0.canary.10748";
9732
+ const version = "1.6.0-beta.1.0.canary.10749";
9730
9733
 
9731
9734
  // ensure the worker ends up in the bundle
9732
9735
  // If the worker should not be included this gets aliased to empty.js
@@ -21714,14 +21717,28 @@ class EMEController extends Logger {
21714
21717
  // Close all sessions and remove media keys from the video element.
21715
21718
  const keySessionCount = mediaKeysList.length;
21716
21719
  EMEController.CDMCleanupPromise = Promise.all(mediaKeysList.map(mediaKeySessionContext => this.removeSession(mediaKeySessionContext)).concat(media == null ? void 0 : (_media$setMediaKeys = media.setMediaKeys(null)) == null ? void 0 : _media$setMediaKeys.catch(error => {
21720
+ var _this$hls2;
21717
21721
  this.log(`Could not clear media keys: ${error}`);
21722
+ (_this$hls2 = this.hls) == null ? void 0 : _this$hls2.trigger(Events.ERROR, {
21723
+ type: ErrorTypes.OTHER_ERROR,
21724
+ details: ErrorDetails.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,
21725
+ fatal: false,
21726
+ error: new Error(`Could not clear media keys: ${error}`)
21727
+ });
21718
21728
  }))).then(() => {
21719
21729
  if (keySessionCount) {
21720
21730
  this.log('finished closing key sessions and clearing media keys');
21721
21731
  mediaKeysList.length = 0;
21722
21732
  }
21723
21733
  }).catch(error => {
21734
+ var _this$hls3;
21724
21735
  this.log(`Could not close sessions and clear media keys: ${error}`);
21736
+ (_this$hls3 = this.hls) == null ? void 0 : _this$hls3.trigger(Events.ERROR, {
21737
+ type: ErrorTypes.OTHER_ERROR,
21738
+ details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
21739
+ fatal: false,
21740
+ error: new Error(`Could not close sessions and clear media keys: ${error}`)
21741
+ });
21725
21742
  });
21726
21743
  }
21727
21744
  onManifestLoading() {
@@ -21768,11 +21785,25 @@ class EMEController extends Logger {
21768
21785
  this.mediaKeySessions.splice(index, 1);
21769
21786
  }
21770
21787
  return mediaKeysSession.remove().catch(error => {
21788
+ var _this$hls4;
21771
21789
  this.log(`Could not remove session: ${error}`);
21790
+ (_this$hls4 = this.hls) == null ? void 0 : _this$hls4.trigger(Events.ERROR, {
21791
+ type: ErrorTypes.OTHER_ERROR,
21792
+ details: ErrorDetails.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,
21793
+ fatal: false,
21794
+ error: new Error(`Could not remove session: ${error}`)
21795
+ });
21772
21796
  }).then(() => {
21773
21797
  return mediaKeysSession.close();
21774
21798
  }).catch(error => {
21799
+ var _this$hls5;
21775
21800
  this.log(`Could not close session: ${error}`);
21801
+ (_this$hls5 = this.hls) == null ? void 0 : _this$hls5.trigger(Events.ERROR, {
21802
+ type: ErrorTypes.OTHER_ERROR,
21803
+ details: ErrorDetails.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
21804
+ fatal: false,
21805
+ error: new Error(`Could not close session: ${error}`)
21806
+ });
21776
21807
  });
21777
21808
  }
21778
21809
  }