- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Mon, 25 Sep 2023 15:01:01 +0000
- To: public-webrtc-logs@w3.org
> I'm aware of applications that want to know when the set of devices change to decide if/when to make a new getUserMedia call or to provide a notification to the user (e.g., to request permission again). I'm asking about the use case, the real-world problem that requires this change that isn't possible today. [Earlier](https://github.com/w3c/mediacapture-main/issues/966#issuecomment-1726616311) I clarified two reasons why the observable set may change: 1. a "real" device change (use case: app wants to react to a user having just inserted a new physical device) 2. getUserMedia ungates full device info of more than one of a kind of device to choose from I trust it's clear that if the same event fires for both 1 and 2 then that interferes with detecting 1. The problem [use case](https://github.com/w3c/mediacapture-main/issues/966#issuecomment-1727807059) I gave was getUserMedia racing with the user putting on their headset. Number 2 is the norm frankly. Most devices (cellphones) have more than one device of a kind. In the spec, apps should assume they don't have the full set of information ahead of gUM (like in Safari), and not need an event to tell them this. > if/when to make a new getUserMedia call Asking for getUserMedia twice is an anti-pattern. This is why we have constraints — and why Firefox has a picker — to help pick the correct device up front. Per-device permission models work poorly otherwise. I'm not going to call out specific VC apps, but you know who you are. > or to provide a notification to the user (e.g., to request permission again). Using enumerateDevices to detect permission is also an antipattern. Hopefully this clarifies why I'm opposed to this change. -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/966#issuecomment-1733899019 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 25 September 2023 15:01:03 UTC