I inserted a video on the site, you need to make a play and pause button for the video, so that when you close the modal window, the video does not play, but for some reason this does not work, here is the code I used:
html:
<video id="video1" src="video/Nyan-Cat-video.mp4" controls></video> <button onclick="playPause()">Play/Pause</button> javascript:
var myVideo = document.getElementById("video1"); function playPause() { if (myVideo.paused) $('#video1').get(0).play() else $('#video1').get(0).pause() }
myVideo.play()w3schools.com/tags/… from here w3schools.com/tags/av_met_play.asp - Jean-Claude