This helped me pause the Bootstrap carousel when playing native HTML5 video and playing it again when the video is paused or done. I'm a complete JS newbie, but I searched around and weaved several things together. Perhaps I made a mistake (most likely), but this works for me.
I donβt call the video by ID, because I want the action to work on any video playing in the carousel. I have several in my case.
Note to change the carousel ID to suit yours.
<script> $('video').on('play', function (e) { $("#portfolioCarousel").carousel('pause'); }); $('video').on('stop pause ended', function (e) { $("#portfolioCarousel").carousel(); }); </script>
source share