How do I know when exoplayer stopped?

How do I know when any of ExoPlayers stopped playing? I am currently using 10 buttons mapped to 10 players and I have to start an onscreen animation(split up Gif into jpegs, named frame_0.jpg up to frame_31.jpg) when a sound starts playing and stop the animation(a.k.a. stop the Timer) when a sound finishes, I’ve tried everything I could think of, can you help me? This is my current setup: