Using JavaScript to loop all gallery videos simultaneously

Question:
How can I have every video in my gallery play and loop simultaneously on page load?

Product:
Editor X.

What are you trying to achieve:
I want to have the videos in my gallery play together when the page loads, and to continue looping, though I’m having trouble coding this with JavaScript.

What have you already tried:
I’m able to iterate over the gallery array using a forEach loop inside of an onViewportEnter function, but there doesn’t seem to be a function available the ‘play’ each index item.The gallery has a mixture of images and videos (though it will only be videos eventually), though regardless each item is still treated as an image type.

Additional information:
I am familiar with general JavaScript logic and syntax, though not with how it’s implemented in Wix.