Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect camera hardware #328

Open
op opened this issue Aug 14, 2019 · 4 comments
Open

Disconnect camera hardware #328

op opened this issue Aug 14, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@op
Copy link

op commented Aug 14, 2019

Feature Request

Description
Expose a way to disconnect the camera. You can set publishVideo to stop the publishing of the video. The camera will still be allocated.

The root issue we're trying to solve is to release the camera when someone locks their phone. This to allow Android users to continue to use eg the iris scanner to unlock their phone.

Proposal
You can set videoTrack on initialise. Allow this to be set while running?

@op op closed this as completed Aug 14, 2019
@op
Copy link
Author

op commented Aug 14, 2019

I played around with removing the OTPublisher and adding it back but it didn't work. Giving up now.

It would be amazing to have a way to control the allocation of the hardware too!

@op op reopened this Aug 14, 2019
@ggoldens
Copy link
Contributor

Hi @op, sorry for the late reply.
I just tested it like this:
<OTSession .....>
{this.state.showPublisher && <OTPublisher style={{ width: 600, height: 480 }} />}
</OTSession/ >
If showPublisher is false, the OTPublisher is not being renderer and the publisher stream is destroyed. If you re-render it again, it will create the publisher.

Can you confirm if you see the same?

@op
Copy link
Author

op commented Aug 27, 2019

@ggoldens Thanks! That's what I tried but it disconnects the user from the stream. I'm looking for a way to turn the camera off but leave the audio on.

Is there a way to update the videoTrack property?

@freddiecabrera
Copy link

Is this not possible? I am trying to add buttons to

  • Toggle mute
  • Toggle speaker
  • Toggle video
  • Toggle front-facing camera/back-facing camera

@abdulajet abdulajet added the enhancement New feature or request label May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants