Skip to content
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

Add deviceId option to selectAudioOutput() #104

Merged
merged 9 commits into from
Aug 20, 2020

Conversation

jan-ivar
Copy link
Member

@jan-ivar jan-ivar commented Aug 13, 2020

Fixes #99 (as a proposal)


Preview | Diff

@jan-ivar jan-ivar requested review from aboba and youennf August 13, 2020 14:41
@jan-ivar jan-ivar self-assigned this Aug 13, 2020
index.html Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
Copy link
Contributor

@youennf youennf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, some comments below.

</li>
<li><p>If <var>device</var> is available, resolve
<var>p</var> with either <var>deviceId</var> or a freshly
rotated device id for <var>device</var>, and abort the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably implementation dependent, but can you clarify when we would reuse the deviceId and when we would use a rotated device Id? In Safari implementation, we would probably either reuse the deviceId or prompt.
A few additional edge cases:

  • If we call twice selectAudioOutput with the same old deviceId, and we end up in this 'reuse deviceId' case, I would expect the implementation to always return the same deviceId (either the old one if rotation did not happen, or the same new one), except if rotation happened in between. The term 'freshly' might be a bit ambiguous.
  • If the deviceId is already exposed as part of enumerateDevices, I would expect all implementations of selectAudioOutput to just return the provided deviceId.

index.html Outdated Show resolved Hide resolved
@alvestrand alvestrand marked this pull request as ready for review August 20, 2020 14:20
@alvestrand alvestrand merged commit b007b5b into w3c:master Aug 20, 2020
@jan-ivar jan-ivar deleted the persistence branch August 20, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web pages might want to easily set a speaker setup previously used
3 participants