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

Multiple applications, same device #60

Open
jimb456 opened this issue Apr 26, 2021 · 1 comment
Open

Multiple applications, same device #60

jimb456 opened this issue Apr 26, 2021 · 1 comment

Comments

@jimb456
Copy link

jimb456 commented Apr 26, 2021

Is there any or will there be any way to know how many WebHID apps have a device open? Apps are not very good at cooperating. With a microphone device, there is an issue that we have experienced in our product. The mic is opened and "sync'd" to our conferencing application for mute/unmute. The user mutes the device but goes to another app, say a softphone like Skype, and that app unmutes it (unbeknownst to the user this also unmutes our app). User talks on phone: "I'm in the middle of this stupid conference". Bad. Not sure anything can be done to fully solve this type of issue except tell the user to be careful but perhaps there is a way for use to tell whether another app has also opened this device? Thanks for any thoughts.

@nondebug
Copy link
Collaborator

I don't expect we will allow sites to know when other sites have access to the same device since that could violate the same-origin policy. In some cases it may be possible to determine this from the device behavior itself, like the microphone mute example you described. However, it probably shouldn't be part of the API.

At the operating system level, applications can avoid this issue by requesting exclusive access to a HID device. WebHID doesn't support an exclusive access mode yet but I think it's likely we'll add it at some point to reduce the potential for interference and improve security when applications are accessing sensitive devices like headsets.

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

2 participants