-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioContext.onerror #2580
AudioContext.onerror #2580
Conversation
@padenot Ready for the first pass. Let me know what you think! |
Hi @padenot; I just wanted to bump this. |
@jernoble, could you take a look at this also by chance? |
@padenot It looks like we resolved all discussions so far. Let me know if you have more questions! |
@jernoble @marcoscaceres Can any of you comment on this pull request? We've been waiting for three weeks, and would like to merge this PR so that we can make progress on the browser implementation. The PR itself is not really controversial; we want to add an event handler for audio device/platform errors. |
As a comment about the general capability added here, I see no problem with exposing AudioContext error states. This PR appears to be narrowly around handling what happens when the AudioContext loses exclusive access to the current audio sink / device. That either because that device is no longer available permanently (a plug was pulled, a wireless device disappeared, etc.) or because that device is no longer available temporarily (another process / service received exclusive access to that device, etc.). And there's no way to distinguish between those two states here. In the "permanent" error case, there's nothing for the application to do save choose a different sink. In the "temporary" error case, this is recoverable by simply un-suspending. Is there some other mechanism available to distinguish these two states? If not, should the |
This is somewhat related `interrupted' status from the AudioSession. Also I am a bit confused by the expression "no longer available" and "temporarily" in one sentence. We have to consider two cases separately.
|
That was inelegantly phrased on my part. :) I was referring to this new language:
What does "unexpectedly interrupted" mean here? |
Yes, now I can see why you used the word "interrupted". Perhaps I can intentionally move away from that language so we can reserve such case for AudioSession API. My example of "unexpectedly interrupted" cases would be any kind of audio infra malfunction reported by the operating system including (but not limited to):
IMO one significant distinction from the AudioSession is:
The interrupted status can be resumed automatically after the interruption (please correct me if I am mistaken). So I think this can be useful for situations like notification, phone call on mobile device, etc. |
@marcoscaceres @jernoble If you don't have other outstanding concerns, can we land this PR? Also if you would like to have deeper technical discussion on this topic, please consider joining our bi-weekly teleconference. :) |
Thanks @padenot! Merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tut mir leid aber ich kenne mich nicht aus das funktioniert ich bin bitte - [ ] weiterhelfen damit
|
This PR resolves #2567.
onerror
event handler under theAudioContext
interface.onerror
event in the AudioContext constructor steps on the render thread.onerror
case on a running AudioContext.Preview | Diff