I thought this would be simple to set up with a click event, but the it's not recognizing the html5 video's controls as part of the video.
There is another video on the page with the ID of video1 that is set to autoplay. The second video with the ID of video2 does not overplay, but has html5 controls so the viewer can start it. I'd like to have it set up so that once the play button in video2 is selected that video1 stop playing.
Here's what I've tried:
html
<video id="video2" controls>
<source src="assets/explainer.mp4" type="video/mp4">
This browser does not support HTML5 video
</video>
js
$('#video2').click(function(){
$('#video1').get(0).pause();
});
Note that if I click on the video it works, but click on the controls does not.