Trigger lottie to play inside Bootstrap accordion

My client wants to have a Bootstrap accordion on their Services page for each of their services. They want a lottie animation in each of the accordion panels. How can I code so the animation is triggered to play only when its accordion panel is opened?