You need to delete your old embeds and replace them with the one I wrote.
The javascript code needs to be wrapped within tags and inserted before the end of the tag. Also, don’t forget to reference the vimeo player API source script before the javascript snipet itself, also wrap it inside the tag like so:
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
// on document ready
document.addEventListener("DOMContentLoaded", e => {
// execute constructor function
initVimeo();
});
// function declaration
function initVimeo() {
// create an array of all items
const items = document.getElementsByClassName("item");
for (let i = 0; i < items.length; i++) {
// get each single div element of the array
let item = items[i];
// find the .vimeo element within the element of the array
let vimeo_element = item.querySelector(".vimeo");
console.log(vimeo_element);
let vimeo_id = vimeo_element.getAttribute("id");
console.log(vimeo_id);
// player options
let options = {
id: vimeo_id,
autoplay: true,
autopause: 0,
loop: true,
muted: true,
responsive: true,
};
// player constructor
let player = new Vimeo.Player(vimeo_element, options);
} // end for loop
} // end function declaration
</script>
Also, not sure why you would like to play sound on multiple video ?