Hey there everyone
Newbie here looking for some help. We're building a site on 7.1 tand we want a lottie to animate on scroll. At the moment we can't get it to work at all. It doesn't start scrolling, and when 'autoplay' and 'loop' are removed from the code block the lottie disappears. Can anyone help tweak the code?
This is what we have at the moment:
In Code Block container
<lottie-player id="firstLottie"
autoplay
src="https://lottie.host/34ce465b-cd91-4cc8-bc1a-b2ed33f9600f/OFCFTqFgzG.json"
style="width:100%; height: auto;">"></lottie-player>
Code injection in Header:
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script>
Code injection in footer:
<script>
LottieInteractivity.create({
player: "#firstLottie",
mode:"scroll",
container: "#block-yui_3_17_2_1_1696515827607_2322",
actions: [
{
visibility: [0, 1.0],
type: 'seek',
frames: [0, 150],
},
]
});
</script>
Any help would be very much appreciated!