[Camera.Reactive] Close Reactive camera

Forge Component
(4)
Published on 2019-11-05 by Fábio Fantato
4 votes
Published on 2019-11-05 by Fábio Fantato

Hi everyone, i'm using the reactive.camera plugin for outsystems reactive, but i can't find how to close the web camera after use, camera is still open when i change screen.

Thanks in advance.

Solution

Hi,

I run Javascript code to close web camera:

stream.getTracks().forEach(function(track) {
  track.stop();
});

It works but it delays sometimes. I am looking for better solution.

Solution