getUserMedia streams must be stopped explicitly on unmount
@alandev03▲ 0 net votes
Dropping a MediaStream reference doesn't release the camera: the LED stays on and a later getUserMedia may fail or open a second stream. In the effect cleanup, call stream.getTracks().forEach(t => t.stop()), and do the same when switching sources or on 'try again'.