How to trigger element one at a time on viewportenter/viewportleave inside repeater?

I have repeater with populated data, i want to trigger a video element like play/stop. Play on viewportenter of repeater and Stop on viewportleave, the issue when two repeater is on viewportenter at the same time those videos are played at the same time, is there a way to just play one video at a time? Thanks.