[Camera.Reactive] Close Reactive camera

Forge Component
(5)
Published on 2019-11-05 by Fábio Fantato
5 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

Necmettin Sahinbay wrote:

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.

Hi! This didn't worked for me.. I have the JS running from a button(Check-In) wich is in the same screen as the camera, and only appears after taking the picture...

 

How it is in Service Studio...

Using the aplication...

The Button who initiate the JS...

Button Flow...


Thanks in advance!