**I have a list of HTML5 videos that also have a play button.
Each play button has a unique identifier (as a class name), and then each video has a matching class name, so that I can assign a specific button to a specific video for playback.**
var videoPlayBackBtn = document.getElementsByClassName('video-play-button');
for (let item of videoPlayBackBtn) {
console.log(item.id);
item.addEventListener('click', function(){
console.log(this);
})
}
With the above JS I am able to get the identifier used for the video, and I wish to simply play the video with the matching identifier as the play button, and pause any other videos that don’t match. How can I target a specific video in this scenario?