Play a lottie file when in viewport, then freeze on last frame

I’d like to have a lottie file start playing when in viewport then freeze on last frame (i know this is possible).
But if after you scroll past it, then scroll back up to it, it is still stuck on the last frame and will only trigger a replay if you scroll back up past it, then back down the page until it is in the viewport again (this is when it plays again, scrolling from top to bottom with it in the viewport). does this make sense?

Thanks for any help I get!