You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
As far as I can tell this will keep the returned stream alive indefinitely in Chrome (tested in v109 and v111). Firefox for example will garbage collect the stream.
To Reproduce
Steps to reproduce the behavior:
Run the line of code from above.
Observe that the microphone indicator of the operating system (tested on macOS) will never go away again.
Expected behavior
I think the stream should be stopped immediately when getUserMedia() is only used to trigger the permission to view more devices.
Additional context
By coincidence there is currently a spec discussion if garbage collecting an unused stream like that should be allowed or not. w3c/mediacapture-main#910
The text was updated successfully, but these errors were encountered:
chrisguttandin
added
bug
Something on the site is broken!
P2
A normal priority task. This is the default for most issues.
labels
Jan 14, 2023
Describe the bug
The article about
setSinkId()
(https://developer.chrome.com/en/blog/audiocontext-setsinkid/) contains a snippet which may cause a memory leak.The article recommends to trigger the permission to view all audio output devices by calling
getUserMedia()
like this:As far as I can tell this will keep the returned stream alive indefinitely in Chrome (tested in v109 and v111). Firefox for example will garbage collect the stream.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I think the stream should be stopped immediately when
getUserMedia()
is only used to trigger the permission to view more devices.I'm happy to provide a PR to update the article.
Additional context
By coincidence there is currently a spec discussion if garbage collecting an unused stream like that should be allowed or not. w3c/mediacapture-main#910
The text was updated successfully, but these errors were encountered: