-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
FF116 Audio Output Device API updates #27818
FF116 Audio Output Device API updates #27818
Conversation
Preview URLs (6 pages)Flaws (14)Note! 5 documents with no flaws that don't need to be listed. 🎉 URL:
(comment last updated: 2023-07-20 23:24:19) |
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.
Looks great, thank you very much!
fcad51f
to
81e5a03
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
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.
Just little things.
The **`HTMLMediaElement.setSinkId()`** method of the [Audio Output Devices API](/en-US/docs/Web/API/Audio_Output_Devices_API) sets the ID of the audio device to use for output and returns a [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). | ||
|
||
This only works when the application is permitted to use the specified device. | ||
For more information see the [security requirements](#security_requirements) below. | ||
|
||
## Syntax |
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.
Not in your PR, but I think we need a better way of talking about "exceptions" for functions that return promises, because presumably these exceptions aren't thrown (unless the function is called with await
) but rather the promise rejects with them.
So maybe after ### Exceptions
we should say something like "The returned promise may reject with any of the following excepotions"? I wonder if @teoli2003 has an opinion on this.
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.
I have been avoiding this question by just listing the exceptions - not "this exception will be thrown" or "promise will be rejected with this exception". I see this as less wrong that either of the above options, but that's just an opinion.
We should have a decision and standard words on this - raise a discussion?
Co-authored-by: wbamberg <[email protected]>
The option is intended for applications that want to store a device id so that the same device can be used by default in future sessions. | ||
Note that the method may return a new ID for the same device, and that persisted ids _must be passed_ through `selectAudioOutput()` successfully before they will work with {{domxref("HTMLMediaElement.setSinkId","setSinkId()")}}. |
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.
FYI @wbamberg This is updated explanation of what it means to persist a device id
@wbamberg Thanks for the feedback. I think everything that is an action on this PR has been addressed now. |
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.
Thank you @hamishwillee ! I won't merge this because of the Prettier failures. I wish #27070 would get some kind of resolution :(.
Thanks @wbamberg. I'm not happy about that prettier PR stalling. It's such an obvious barrier to contribution. |
What is a bit frustrating is that we had this exact conversation about 18 months ago, and this was exactly the reason we didn't just run Prettier in CI then. And now we did, and exactly what we thought would happen, is happening. |
FF116 adds support for the Audio Output Device API.
This improves some of the docs. There feels like quite a lot of duplication, in particular around the way permissions/security considerations work. But at least it should not be "wrong". Happy to take advice.
Other docs work can be tracked in #27748