@asante-org/atlascopco-vt-litesitegenerator 3.0.7 → 3.0.8
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/src/components/lsg/LsgHero/LsgHero.stories.d.ts +1 -0
- package/dist/themes/theme-1.js +13 -5
- package/dist/themes/theme-1.js.map +1 -1
- package/dist/themes/theme-2.js +13 -5
- package/dist/themes/theme-2.js.map +1 -1
- package/dist/themes/theme-3.js +13 -5
- package/dist/themes/theme-3.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/themes/theme-1.js
CHANGED
|
@@ -2443,11 +2443,19 @@
|
|
|
2443
2443
|
scrollDownBtn: hero.querySelector(".lsg-hero__scroll-down-btn"),
|
|
2444
2444
|
scrollDownTarget: hero.nextElementSibling,
|
|
2445
2445
|
}, { transition: transition, autoplay: isCarousel });
|
|
2446
|
-
// DAM video fade-in on canplay
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2446
|
+
// DAM video fade-in on canplay. The element is .lsg-hero-card__video (LsgHeroCard owns it),
|
|
2447
|
+
// and the SCSS keys the opacity transition on .lsg-hero-card__video--ready.
|
|
2448
|
+
hero.querySelectorAll(".lsg-hero-card__video").forEach(function (video) {
|
|
2449
|
+
var markReady = function () { return video.classList.add("lsg-hero-card__video--ready"); };
|
|
2450
|
+
// Server-rendered markup (AEM) can reach a playable readyState before this footer
|
|
2451
|
+
// clientlib runs, in which case "canplay" has already fired and never arrives again.
|
|
2452
|
+
// HAVE_FUTURE_DATA (3) is the readyState "canplay" corresponds to.
|
|
2453
|
+
if (video.readyState >= 3) {
|
|
2454
|
+
markReady();
|
|
2455
|
+
}
|
|
2456
|
+
else {
|
|
2457
|
+
video.addEventListener("canplay", markReady, { once: true });
|
|
2458
|
+
}
|
|
2451
2459
|
});
|
|
2452
2460
|
});
|
|
2453
2461
|
}
|