PreLoader animation sync

I find kind of strange I don’t find any tuts on this, how can you manage to use a Lottie animation as Preloader and make the animation frames evolve as same time as the % loaded of the page ?