@d-i-t-a/reader 2.1.0-beta.10 → 2.1.0-beta.11

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/esm/index.js CHANGED
@@ -41273,14 +41273,14 @@ var MediaOverlayModule = class {
41273
41273
  await this.playMediaOverlays(hrefUrlObj.pathname.substr(1), link.MediaOverlays, void 0);
41274
41274
  } else {
41275
41275
  if (this.audioElement) {
41276
- await this.audioElement.pause();
41276
+ await this.audioElement?.pause();
41277
41277
  }
41278
41278
  if (this.currentLinks.length > 1 && this.currentLinkIndex === 0) {
41279
41279
  this.currentLinkIndex++;
41280
41280
  await this.playLink();
41281
41281
  } else {
41282
41282
  if (this.settings.autoTurn && this.settings.playing) {
41283
- this.audioElement.pause();
41283
+ this.audioElement?.pause();
41284
41284
  this.delegate.nextResource();
41285
41285
  } else {
41286
41286
  this.stopReadAloud();
@@ -41331,7 +41331,7 @@ var MediaOverlayModule = class {
41331
41331
  pauseReadAloud() {
41332
41332
  if (this.delegate.rights.enableMediaOverlays) {
41333
41333
  this.settings.playing = false;
41334
- this.audioElement.pause();
41334
+ this.audioElement?.pause();
41335
41335
  if (this.play)
41336
41336
  this.play.style.removeProperty("display");
41337
41337
  if (this.pause)
@@ -41443,9 +41443,9 @@ var MediaOverlayModule = class {
41443
41443
  this.currentLinkIndex++;
41444
41444
  this.playLink();
41445
41445
  } else {
41446
- this.audioElement.pause();
41446
+ this.audioElement?.pause();
41447
41447
  if (this.settings.autoTurn && this.settings.playing) {
41448
- this.audioElement.pause();
41448
+ this.audioElement?.pause();
41449
41449
  this.delegate.nextResource();
41450
41450
  } else {
41451
41451
  this.stopReadAloud();
@@ -41477,9 +41477,9 @@ var MediaOverlayModule = class {
41477
41477
  this.currentLinkIndex++;
41478
41478
  this.playLink();
41479
41479
  } else {
41480
- this.audioElement.pause();
41480
+ this.audioElement?.pause();
41481
41481
  if (this.settings.autoTurn && this.settings.playing) {
41482
- this.audioElement.pause();
41482
+ this.audioElement?.pause();
41483
41483
  this.delegate.nextResource();
41484
41484
  } else {
41485
41485
  this.stopReadAloud();
@@ -41497,7 +41497,7 @@ var MediaOverlayModule = class {
41497
41497
  import_loglevel10.default.log("mediaOverlaysPause()");
41498
41498
  this.mediaOverlayHighlight(void 0);
41499
41499
  if (this.audioElement) {
41500
- this.audioElement.pause();
41500
+ this.audioElement?.pause();
41501
41501
  }
41502
41502
  }
41503
41503
  findNextTextAudioPair(mo, moToMatch, previousMo, escape2) {
@@ -41635,7 +41635,7 @@ var MediaOverlayModule = class {
41635
41635
  import_loglevel10.default.log("playMediaOverlaysAudio() - RESET: " + this.previousAudioUrl + " => " + this.currentAudioUrl);
41636
41636
  this.audioElement = document.getElementById("AUDIO_MO_ID");
41637
41637
  if (this.audioElement) {
41638
- this.audioElement.pause();
41638
+ this.audioElement?.pause();
41639
41639
  this.audioElement.setAttribute("src", "");
41640
41640
  if (this.audioElement.parentNode) {
41641
41641
  this.audioElement.parentNode.removeChild(this.audioElement);
@@ -41669,7 +41669,7 @@ var MediaOverlayModule = class {
41669
41669
  await this.playLink();
41670
41670
  } else {
41671
41671
  if (this.settings.autoTurn && this.settings.playing) {
41672
- this.audioElement.pause();
41672
+ this.audioElement?.pause();
41673
41673
  this.delegate.nextResource();
41674
41674
  } else {
41675
41675
  this.stopReadAloud();