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

oldList definition in enumerateDevices is unclear #604

Closed
youennf opened this issue Jun 6, 2019 · 3 comments
Closed

oldList definition in enumerateDevices is unclear #604

youennf opened this issue Jun 6, 2019 · 3 comments
Assignees

Comments

@youennf
Copy link
Contributor

youennf commented Jun 6, 2019

oldList in enumerateDevices seems to be per browsing session.
I guess it should be scoped by document, as groupId is per-document and we also want deviceIds to be partitioned per origin, which oldList might mess up with.

It is also not clear when oldList is set/built/updated. Is it set the first time enumerateDevices is called? Or is oldList the result of the last time enumerateDevices is called? Or is it a consolidation of all devices exposed during the various enumerateDevices calls?

I am also not very clear about the purpose of oldList as well. It seems that this is either an optimization (unnecessary then), a way to make sure deviceId/groupId are consistent call after call (but this is insufficient for deviceIds which are living longer than the browsing session and somehow redundant with MediaDeviceInfo.deviceId/groupId definitions), or a way for device === when enumerateDevices is called more than once (testing suggests this is not implemented this way in browsers currently).

I would tend to try removing oldList.

@youennf
Copy link
Contributor Author

youennf commented Aug 30, 2019

testing suggests this is not implemented this way in browsers currently

https://jsfiddle.net/63Lorgkq/

@youennf
Copy link
Contributor Author

youennf commented Sep 6, 2019

Above jsfiddle.net tends to show that browsers do not implement step 3 of https://w3c.github.io/mediacapture-main/#dom-mediadevices-enumeratedevices.

Also, step 8.2 is not very clear in whether filteredList is a deep clone or not of resultList.
If not, the same object would be returned but the label getter would return the label conditionally on the 'device-info' permission. This is probably worth a separate issue.

@youennf
Copy link
Contributor Author

youennf commented Jan 16, 2020

Closing since remaining items were fixed in #620

@youennf youennf closed this as completed Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants