How can I ensure that the alert event is triggered only once at the 15-second mark of a 45-second video? The code snippet below initiates the alert, but how can I modify it to make sure the alert only appears once.
var video = document.getElementById("media");
video.addEventListener('timeupdate', function(e) {
if (e.target.currentTime == 15000);
alert("Hello! I am an alert box!!");
}, false);