Play / Pause Video and javascript issue
I have a project with a bunch of Videoclips.
I control them with a play and pause button
I also have another button that close down the video.
The Pause Button:
document.getElementsByTagName("video")[0].pause();
document.getElementsByTagName("video")[1].pause();
The Play Button:
document.getElementsByTagName("video")[0].play();
document.getElementsByTagName("video")[1].play();
The Close Button:
document.getElementsByTagName("video")[1].pause();
document.getElementsByTagName("video")[0].pause();
$('[id^=video_1]').hide()
The prpoblem with this scripts are that the Close button just pause the video and hide the layer.
When I then open another video and press play two videos will play. The new one and the one that I closed(hide and paused) by clicking the close button.
So is there a way to disable/close a layer to avoid this problem?
