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

Clarify when to fire devicechange event for changes of device capabilities #730

Closed
youennf opened this issue Oct 1, 2020 · 5 comments
Closed

Comments

@youennf
Copy link
Contributor

youennf commented Oct 1, 2020

Devices may not be added or removed but their capabilities or labels may changed.
In that case, it might be good to fire a devicechange event provided labels are exposed.

@guest271314
Copy link

Devices can be added and removed. Plug and play USB devices, Bluetooth devices, virtual devices. Firing devicechange has nothing to do with listing the incorrect device if incorrect device is still listed.

@guest271314
Copy link

The issue is Chromium refuses to list or capture audio devices that include monitor text in device description at Linux. To workaround that arbitrary restriction it is possible to dynamically change and set the devices being captured to a monitor device https://bugs.chromium.org/p/chromium/issues/detail?id=931749, thus, when the device changes not only must a devicechange event be fired but also the correct device being captured needs to be listed at enumerateDevices(), in spite of Chromium in-house decisions imposing restrictions of device capture. Firing devicechange alone in this case will not solve the bug that #693 was filed for if the exact same devices are listed.

@jan-ivar
Copy link
Member

I think we have to be careful not to disturb what I think is the primary use case of devicechange:

  • Detecting user insertion (or bluetooth activation) of a new device (meaning: user intends to use this device)

Recall: the event is insufficient, apps must diff enumerateDevices results (after gUM grant!) before and after the event.

Hopefully apps are diffing only on deviceIds. But if they're not (diffing on the entire entry or label), then changing a label may trigger a false positive insertion (apps thinking the user wants to use new device when they don't).

@alvestrand
Copy link
Contributor

Not clear how properties such as label would change, or whether browsers would be able to detect it (apart from polling).

@jan-ivar
Copy link
Member

This seems like a user agent configuration issue, and it's not clear there's value in standardizing what they should do here. Closing as no action needed.

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

No branches or pull requests

4 participants