I added an event handler to handle the mousedown event in firefox, but when this event occurs, I get an NS_error failure message, the error message is displayed in firefox, but chrome handles the event properly.
Here is the code section
document.getElementById("fancybox-close") .addEventListener("mousedown", function () { c.video.currentTime = "00:00"; document.getElementById("playr_video_curpos_" + c.video_id).innerHTML = c.parseTimeCode(c.video.currentTime); }, false);
I connected the event listener to the close button on the video player, so when you press the close button, the video should be reset to 00:00 (Note: c = this ).
As mentioned earlier, this works on chrome, but on firefox I get this error message
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLVideoElement.currentTime]
Any idea why I am getting this message?
source share