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

In case an AudioSession is explicitly set, should some incompatible APIs start failing? #3

Open
youennf opened this issue Nov 8, 2022 · 4 comments
Labels
TPAC2024 Topic for discussion at TPAC 2024

Comments

@youennf
Copy link

youennf commented Nov 8, 2022

If a web page sets an explicit audio session to ambient, a call to getUserMedia({audio:true}) can only succeed if the active audio session is set to play-and-record.
Either we need to change the audio session type, or we need to activate a different audio session, or we need to have getUserMedia fail.

@jernoble
Copy link

a call to getUserMedia({audio:true}) can only succeed if the active audio session is set to play-and-record.

Or, "auto", which is the default.

The only way to get into this situation is to explicitly set the default audioSession.type away from "auto" or "play-and-record", which seems to be a minor foot-gun. Maybe this can be solved with a different Exception code returned from getUserMedia()?

@youennf
Copy link
Author

youennf commented Dec 1, 2022

The additional question is when the type is changed during capture.
Should capture fail or not in that case?

@chrisn chrisn added the TPAC2024 Topic for discussion at TPAC 2024 label Aug 1, 2024
@youennf
Copy link
Author

youennf commented Sep 19, 2024

As mentioned by @eric-carlson, the other case is having an active gum, and trying to set audioSession.type.
The alternatives would be to throw or to fail capture.

@youennf
Copy link
Author

youennf commented Sep 19, 2024

Tentative TPAC 2024 proposal: reject gum in case of conflicting audioSession.type, and fail capture if audioSession.type is set (as retrying to capture would reject).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TPAC2024 Topic for discussion at TPAC 2024
Projects
None yet
Development

No branches or pull requests

3 participants