Bug 1986461 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

### Why it appears to work in Chrome's new picker:

Chrome _appears_ to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes. IOW, Chrome lets the user pick which devices are _"system default"_ for that page.

I recommend the approach in comment 2 which should work in all browsers.
### Why it appears to work in Chrome's new picker:

Chrome _appears_ to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes (which Chrome doesn't do AFAICT, and would be confusing if it did). IOW, Chrome lets the user pick which devices are _"system default"_ for that page.

I recommend the approach in comment 2 which should work in all browsers.
### Why it appears to work in Chrome's new picker:

Chrome [appears](https://jan-ivar.github.io/dummy/enumerate.html) to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes (which Chrome doesn't do AFAICT, and would be confusing if it did). IOW, Chrome lets the user pick which devices are _"system default"_ for that page.

I recommend the approach in comment 2 which should work in all browsers.
### Why it appears to work in Chrome's new picker:

Chrome [appears](https://jan-ivar.github.io/dummy/enumerate.html) to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes (which Chrome doesn't do when it's changed like this from the user selecting a camera in its prompts AFAICT, and would be confusing if it did). IOW, Chrome lets the user pick which devices are _"system default"_ for that page.

I recommend the approach in comment 2 which should work in all browsers.
### Why it appears to work in Chrome's new picker:

Chrome [appears](https://jan-ivar.github.io/dummy/enumerate.html) to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes (which Chrome doesn't do when it's changed like this from the user selecting a camera in its prompts AFAICT, and would be confusing if it did). IOW, it appears Chrome is effectively letting its user pick which devices are _"system default"_ for that page.

I recommend the approach in comment 2 which should work in all browsers.
### Why it appears to work in Chrome's new picker:

Chrome [appears](https://jan-ivar.github.io/dummy/enumerate.html) to rearrange the order of devices listed in `enumerateDevices()` to list the devices the user chose in the prompt first. Why this works for Teams isn't clear, but it might be accidental.

Unfortunately, that's [not to spec](https://w3c.github.io/mediacapture-main/#creating-a-list-of-device-info-objects) which says the _"system default"_ device should be listed first, and to fire a `devicechange` event when that changes (which Chrome doesn't do when it's changed like this from the user selecting a camera in its prompts AFAICT, and would be confusing if it did). IOW, it appears Chrome is effectively letting its user pick which devices are _"system default"_ for that page.

For web developers, instead on relying on this nonstandard behavior, I recommend the approach in comment 2 which should work in all browsers.

Back to Bug 1986461 Comment 3