Skip to content

Add deviceId option to selectAudioOutput()#104

Merged
alvestrand merged 9 commits into
w3c:masterfrom
jan-ivar:persistence
Aug 20, 2020
Merged

Add deviceId option to selectAudioOutput()#104
alvestrand merged 9 commits into
w3c:masterfrom
jan-ivar:persistence

Conversation

@jan-ivar

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

Copy link
Copy Markdown
Member

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
Comment thread index.html Outdated
Comment thread index.html

@youennf youennf left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread index.html
</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
Copy Markdown
Collaborator

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.

Comment thread index.html Outdated
@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