The following code:
try {
videoElem.load();
} catch (ignored) {}
Sometimes throws this exception in Firefox: Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.
I think it has to do with Firefox not loading the video when the page is not visible, to save resources. This makes sense, but I would like to catch the exception and continue executing my code.
The statement is already in a try catch, but still the exception is uncaught. load() does not return a promise. How do I catch this error?