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.
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 callgetUserMedia
only once at the beginning and then reuse yourmystream
variable.