Jump to content
  • 0

Cam remains always on


elia pimpinicchio
 Share

Question

Hi,

i'm develop a SPA which have integrated a conference page, to have a video call. 
the problem is that when i go to videocall and after come back to my profile, the cam remain always on (i see this because alienware have near the webcam a led, and this remains always on).

Is there a way to turn off the camera when i change page of my application??

Best Regards.

Elia Pimpinicchio
Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
Hi,

if i want, after the stop, to restart the camera track? 
Because on the documentation  of  getVideoTrack i haven't seen the start() method. 

my scope is to turn off the camera when people click on turn off, and the dual situation. My problem at this moment is that when i stop track, i can't restart this.

In which way can I solve this problem?

Best Regards.

Elia

Link to comment
Share on other sites

  • 0

Hi,

I assume you keep your local stream in a variable since we stopped using localstream.getTracks()[0].stop(); 

After this you can use this code to enable track again;

var track = localStream.getVideoTracks()[0];
track.enabled = true;

At the worst scenario you can call getUserMedia again to restart the camera.

I hope this may help you.
Tahir
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...