I have a video on my main page and I can handle the pop-up modal on my screen, but the problem is when I click maximize option on the video and tried to play it, the modal pop-up now will fail to appear.
Here is my current pop-up call from my javascript:
var previousTime = 0;
var currentTime = 0;
video.addEventListener("timeupdate", function (event) {
previousTime = currentTime;
currentTime = video.currentTime;
curTime = Math.floor(currentTime)
if (curTime == '5') {
console.log('pop the question now!')
video.pause();
$('#popQuestModal').modal('show');
}
});
Is there something wrong or missing on my code.