Note that the comments within that function talk a lot about Firefox in particular.
It is a difficult to reproduce issue because it is flaky when this happens. Unfortunately, it happens often enough to be disturbing.
The problem is that I have difficulties catching that AbortError in React.
That AbortError is probably not expected by the SoundManager2 code either: There is still clean up code below that line that will never be executed, leaving SoundManager2 in an inconsistent state.
Every now and then, when I cancel the currently playing audio in Firefox, I get an:
AbortError: The fetching process for the media resource was aborted by the user agent at the user's request.
on this line of the
html5Unload
function:https://github.com/scottschiller/SoundManager2/blob/f432aa9ed96a0f9022e72fc4a1b977ba0643ed71/script/soundmanager2.js#L4195
Note that the comments within that function talk a lot about Firefox in particular.
It is a difficult to reproduce issue because it is flaky when this happens. Unfortunately, it happens often enough to be disturbing.
The problem is that I have difficulties catching that
AbortError
in React.That
AbortError
is probably not expected by theSoundManager2
code either: There is still clean up code below that line that will never be executed, leavingSoundManager2
in an inconsistent state.How can I catch this error in
react-sound
?Any help is greatly appreciated.