Given a video element with a large video and a user with slow connection in Firefox, skipping around the video after playing but before completely being loaded leads to
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.
Presets:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
<video controls>
<source src="http://help.de/somelargevideo.mp4" type="video/mp4">
</video>
Steps to reproduce:
- throttle network activity to minimum
- skip video progress somewhere
- hit play in the controls
- skip to some former point before the loading has finished
Result
Uncaught (in promise) DOMException: The fetching process for the media resource was aborted by the user agent at the user's request.
Question
Any ideas to gracefully catch this?
Custom control implementations for catching the rejection errors are not an option.
And actually after reading the docs I would have expected Firefox to internally handle this similar to Chrome or maybe just fire an abort event https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/abort_event, as it is as deliberate abort action as the message says.