Hey all - I have been having some issues with assigning code to a lottie objects.
In a nutshell, not all functions work. E.g. .stop() and pause() have no effect on the lottie object.
My ultimate goal is to have a Lottie object on stop, untill it scrolled into the viewport.
Considering, some other functions on the same lottie object do work, I wonder if I am missing a library to import. Does anyone know why stop() doesnt work with this example?:
import wixAnimations from 'wix-animations';
import wixWindow from 'wix-window';
$w.onReady(function () {
//Lottie does not play yet by default
$w('#lottieExample').stop();
}
And for reference, this is how I plan to make it play OnViewportEnter once I have the .stop() working (outside of OnReady):
$w("#lottieExample").onViewportEnter( (event) => {
$w('#lottieExample').play();
});
Any help would be appreciated, thank you.