@getflip/swirl-components 0.174.0 → 0.174.1

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/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-03-21T15:12:17",
2
+ "timestamp": "2024-03-22T09:16:02",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.3.1",
@@ -14,7 +14,6 @@ const SwirlLightbox = class {
14
14
  constructor(hostRef) {
15
15
  index.registerInstance(this, hostRef);
16
16
  this.dragging = false;
17
- this.mediaPlayers = [];
18
17
  this.onCloseButtonClick = () => {
19
18
  this.close();
20
19
  };
@@ -31,7 +30,6 @@ const SwirlLightbox = class {
31
30
  this.registerSlides = () => {
32
31
  this.slides = Array.from(this.el.children).filter((el) => el.tagName === "SWIRL-FILE-VIEWER");
33
32
  this.setSlideAttributes();
34
- this.updateMediaPlayers();
35
33
  };
36
34
  this.onPointerDown = (event) => {
37
35
  this.dragging = true;
@@ -186,7 +184,6 @@ const SwirlLightbox = class {
186
184
  });
187
185
  }, 300);
188
186
  this.stopAllMediaPlayers();
189
- this.updateMediaPlayers();
190
187
  this.resetImageZoom();
191
188
  }
192
189
  setSlideAttributes() {
@@ -217,12 +214,12 @@ const SwirlLightbox = class {
217
214
  unlockBodyScroll() {
218
215
  bodyScrollLock_esm.enableBodyScroll(this.el);
219
216
  }
220
- updateMediaPlayers() {
217
+ getMediaPlayers() {
221
218
  const mediaPlayers = utils.querySelectorAllDeep(this.el, "video");
222
- this.mediaPlayers = mediaPlayers;
219
+ return mediaPlayers;
223
220
  }
224
221
  stopAllMediaPlayers() {
225
- this.mediaPlayers.forEach((mediaPlayer) => mediaPlayer.pause());
222
+ this.getMediaPlayers().forEach((mediaPlayer) => mediaPlayer.pause());
226
223
  }
227
224
  resetImageZoom() {
228
225
  this.slides.forEach((slide) => {