@inappstory/slide-api 0.1.43 → 0.1.44

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/index.cjs CHANGED
@@ -2634,8 +2634,8 @@ const waitForImageHtmlElementLoad = async (nodeRef) => {
2634
2634
  nodeRef.removeEventListener("load", onLoad);
2635
2635
  };
2636
2636
  nodeRef.addEventListener("load", onLoad);
2637
- nodeRef.addEventListener("error", err => reject(err));
2638
- if (nodeRef.complete && 0 !== nodeRef.naturalHeight) {
2637
+ nodeRef.addEventListener("error", _ => reject(new Error(`Could not load (Network error) Image from URL: ${nodeRef.src}`)));
2638
+ if (nodeRef.complete && nodeRef.naturalHeight !== 0) {
2639
2639
  if (nodeRef.decode != null) {
2640
2640
  nodeRef.decode().then(() => resolve(nodeRef), reason => reject(reason));
2641
2641
  }
@@ -2668,7 +2668,7 @@ const waitForImageHtmlElementLoad = async (nodeRef) => {
2668
2668
  // };
2669
2669
  const waitForVideoHtmlElementLoad = async (nodeRef) => {
2670
2670
  return new Promise((resolve, reject) => {
2671
- if (void 0 !== nodeRef.oncanplaythrough) {
2671
+ if (nodeRef.oncanplaythrough != null) {
2672
2672
  const onCanplaythrough = () => {
2673
2673
  requestAnimationFrame(() => {
2674
2674
  requestAnimationFrame(() => {
@@ -2683,7 +2683,7 @@ const waitForVideoHtmlElementLoad = async (nodeRef) => {
2683
2683
  nodeRef.load();
2684
2684
  }
2685
2685
  else {
2686
- var onCanPlay = function () {
2686
+ const onCanPlay = () => {
2687
2687
  requestAnimationFrame(() => {
2688
2688
  requestAnimationFrame(() => {
2689
2689
  // @ts-ignore
@@ -4864,7 +4864,7 @@ let SlideApi$1 = class SlideApi {
4864
4864
  });
4865
4865
  }
4866
4866
  catch (reason) {
4867
- console.log("SlideInit, onAllMediaLoaded reject", reason);
4867
+ // console.log("SlideInit, onAllMediaLoaded reject", reason);
4868
4868
  await slideBoxCb();
4869
4869
  this.layoutService.env.setTimeout(() => {
4870
4870
  slideReadyResolve();