Re: [mediacapture-main] What is the granularity of a source? (#940)

> We know that:
>  1. at the minimum, the source is shared between cloned tracks: a getUserMedia call is the minimum granularity for a source

This would mean that `track1` and `track3` here would have the same source, but `track2` would not?
```js
const track1 = navigator.mediaDevices.getUserMedia({video: {deviceId: {exact: deviceId}});
const track2 = navigator.mediaDevices.getUserMedia({video: {deviceId: {exact: deviceId}});
const track3 = track1.clone();
```
What benefit would this distinction have? I don't think it exists in Firefox and Chrome. Does it exist in Safari? 

This interpretation is NOT supported by spec IMHO, because `track2.stop()` would _"[set [[devicesLiveMap]][deviceId] to false.](https://w3c.github.io/mediacapture-main/getusermedia.html#source-stopped)"_, turning off the privacy indicator in the URL bar prematurely while the other two tracks are still live, which fails on privacy and is not how any browser operates today.

The _minimum_ granularity has to be at least the JS [realm](https://html.spec.whatwg.org/multipage/webappapis.html#concept-realm-global) for the spec to work, i.e. the `mediaDevices` object.

> this was used like this in the past in some Safari cases (where multiple cameras cannot run at the same time for instance).

Uses of multiple cameras seem different from multiple uses of the _same_ camera. I don't see the connection.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/940#issuecomment-1473904531 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 March 2023 14:10:51 UTC