You must catch hidden modal event and after you can stop and mute the video.
Like this;
$('#modalId').on('shown.bs.modal', function () {
var vid = document.getElementById("videoId");
vid.pause();//stop to video
vid.muted = true;//muted video
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…