Animate Lottie while mouse is moving

I would like to animate a little character that runs after your mouse as you move it around the page and pauses whenever the mouse is not in motion. Does anyone know if you can make a lottie play while the mouse is in motion and then pause when it stops?
Any ideas appreciated thanks!!