Bug 209580 - enumerateDevices returns different value by calling more than twice
Summary: enumerateDevices returns different value by calling more than twice
Status: RESOLVED DUPLICATE of bug 209417
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 13
Hardware: Mac Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-25 19:44 PDT by Yuji Sugiura
Modified: 2020-03-26 00:13 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuji Sugiura 2020-03-25 19:44:38 PDT
`navigator.mediaDevices.enumerateDevices()` seems not to return same value for the first time calling and after another.

# How to reproduce

- open web page(no matter which page is) and DevTools(Console)
- call `await navigator.mediaDevices.enumerateDevices()`
  - check the result has `audioinput` and `videoinput` devices
- call `await navigator.mediaDevices.enumerateDevices()` again
  - expect the same result, but it returns `audioinput` and `audioinput`(no `videoinput`)

If you got permission by calling `getUserMedia()` first, it works as expected.
Comment 1 Radar WebKit Bug Importer 2020-03-25 19:56:43 PDT
<rdar://problem/60901421>
Comment 2 youenn fablet 2020-03-26 00:13:34 PDT
Thanks for the report Yuji, this is now fixed in WebKit ToT.

*** This bug has been marked as a duplicate of bug 209417 ***