i-aryan / quickmeet

A video chat/meeting webapp using WebRTC and WebSockets. Basically a Google Meet clone + a collaborative Whiteboard.
MIT License
121 stars 66 forks source link

getUserMedia() must be called once only #18

Open ugnich opened 3 years ago

ugnich commented 3 years ago

You call navigator.mediaDevices.getUserMedia every time someone connects. It works in Chrome, but not in Safari on iOS/iPadOS.

On iOS every next navigator.mediaDevices.getUserMedia call will make previous stream unusable. Therefore, you need to call getUserMedia only once at the beginning and then reuse your mystream variable.