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