Closed mehagar closed 1 year ago
onprocessorerror
gets triggered only by two cases:
1) The processor constructor
.
2) The processor's process()
function.
See https://webaudio.github.io/web-audio-api/#dom-audioworkletnode-onprocessorerror.
For your question, we have a plan to add an error handler on AudioWorkletGlobalScope, but the spec work has not been started: https://github.com/WebAudio/web-audio-api/issues/2431
Closing this since we have #2431 to track the same problem.
The current specification includes
onprocessorerror
(https://www.w3.org/TR/webaudio/#dom-audioworkletnode-onprocessorerror), but I would like to be able to get events from errors that may happen in other contexts.For example, I have this:
onprocessorerror
will not receive the test exception, because the error does not occur in the constructor. It is only later when I send a message to the worklet processor that the exception happens.Is it possible to do this already? Ideally I would be able to register an event handler like so: