Closed NogrTL closed 4 years ago
make sure they didn't break anything
hate to be the bearer of bad news, but you did 😬
It seems like because you're requesting the media stream twice, the last requested (and granted) stream will override any previous streams. This means that if I allow webcam access, my video will be displayed, but once I also allow mic access, the video is replaced by audio only.
This is also happening if I already granted both permissions.
tested with Edge (Chromium) and Firefox, both dev builds
The more important issue however is that because you're requesting the media stream twice, some handler function is called twice as well, causing the client to join the room twice, essentially rendering the whole app useless because the second peer can't join now (the room is full).
Please make sure to test stuff like this before making a PR next time :)
If you manage to change the handler function's code so that both media streams are combined and the client only joins the room once, we'll be happy to merge your pull request and thankful for your work!
I'll close this, given that it's been inactive for over 4 months. Feel free to reopen once you fixed the issues described above :)
Separated
MediaDevices.getUserMedia()
into to call, for audio and video.This is fixing error of not getting permissions if you have only audio or video media MDN
If you ask permission for
audio
andvideo
and user doesn't have one of them - promise errors withOverconstrainedError