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

Consider cross-spec device IDs #202

Closed
jyasskin opened this issue Jun 25, 2015 · 2 comments
Closed

Consider cross-spec device IDs #202

jyasskin opened this issue Jun 25, 2015 · 2 comments

Comments

@jyasskin
Copy link
Member

https://w3c.github.io/mediacapture-main/#idl-def-MediaDeviceInfo defines the groupId field to identify a physical device. http://webaudio.github.io/web-midi-api/#idl-def-MIDIPort defines the id field to identify the device. https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice defines the instanceId field to identify a device. A single physical device could appear in more than one of these APIs, and it'd be nice to let web pages figure out that it's a single device, to the extent the browser knows.

@cwilso @slightlyoff (I'm not sure if it makes to file this in a couple of the affected specs, or if it should be a TAG issue.)

@jan-ivar
Copy link
Member

Unfortunately, "device" is used to describe all sorts of different things. For instance, MediaDeviceInfo differentiates between "device" (deviceId) and "physical device" (groupId)!

Looking at your list:

  • groupId is a data-less grouping token for mic and camera belonging to the same "physical" hardware. Not persisted to disk, but stable within a browser-session and not origin-unique (I'm surprised no-one's picked up on this fingerprinting issue). Did you mean deviceId?
  • deviceId is per audio/video etc. device, origin-unique, and persistent only after certain criteria. Persist deviceIds only after gUM permission grant. #218
  • id for MIDIPort - after a quick read this also seems not origin-unique. Has it been privacy vetted?
  • instanceId for bluetooth seems origin-unique and scoped to the grant-window of the device, which I assume means it's persistent.

These all seem tailored to their domain, and not easily interchangeable to me.

@jyasskin
Copy link
Member Author

Thanks @jan-ivar. Since this is a cross-spec issue, @slightlyoff suggested I open w3ctag/design-reviews#64, which I believe incorporates your comments.

I'll file a new issue about groupId's origin-uniqueness. MIDIPort.id is addressed in WebAudio/web-midi-api#48.

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

3 participants