title: Does getUserMedia give same or new stream when called more than once?
body: <p>If your app wants to get the same user media, say the audio with the exact same constraints, more than once, will <code>navigator.mediaDevices.getUserMedia</code> call return a new stream, so will allocate same amount of computing resources, or will it just give you the same stream (same object with same reference) hence do not uses extra resources?</p>
  <p>I am tarnsmitting the user's audio stream to another user of the app. At some point a third or more users will join and they need the same audio from the first user that the first user is transmitting to the second user to be transmitted to themselves.</p>
  <p>I want to be as efficient as not allocating new resources for the copy of the same audio stream.</p>
  <p>Should I call <code>navigator.mediaDevices.getUserMedia</code> again and it will give me the same stream (same reference) it has given me before, or should I not do that since it will give me a new audio stream even the constraints I have supplied are the exact same, and I should just reuse the previously returned audio stream by a way such as storing it in a variable in reach?</p>
  <p><em>My investigations show that the streams', <code>MediaStream</code> objects') <code>id</code>s are different. It looks like they are different objects.</em></p>
  <pre><code>const str = await navigator.mediaDevices.getUserMedia({audio: true})
  MediaStream {  ​
  active: true    ​
  id: &quot;{f3b334cd-8507-408f-94e9-40b42bbd73f6}&quot;
  ...
  }
  
  const str1 = await navigator.mediaDevices.getUserMedia({audio: true})
  MediaStream {
  active: true
  id: &quot;{ec94325c-19d8-4e91-b668-636f3c267ad4}&quot;
  ​...
  }
  </code></pre>
  <p><em>Also a call to <code>Object.is(str, st1)</code> returns <code>false</code>.</em></p>