getusermedia close Stream

stream.getTracks().forEach(track => track.stop())
ofroog