Skip to content

IOS & Android Bug: Wrong behavior of pause and torchOn parameters #23

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

Closed
cjohn001 opened this issue Dec 22, 2021 · 0 comments
Closed

IOS & Android Bug: Wrong behavior of pause and torchOn parameters #23

cjohn001 opened this issue Dec 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@cjohn001
Copy link
Contributor

The pause and torchOn parameters are not working as expected and behave different on Android and IOS.

Current Behavior iOS:

if pause = true && torchOn = true
-> video stream stopped when MlKitView is loaded and torch is activated. As expected. However, when video stream gets started (torchOn still true) the torch gets deactivated

Current behavior on Android:

if pause = true && torchOn = true
-> video stream is started when MlKitView is loaded and torch is off. Initial values of parameters do not have an effect.

I think the expected behavior should be discussed first. I see two options how the behavior of the parameters could be:

  1. If torchOn=true, torch is activated as soon as video stream is started, and stopped when video stream is stopped (hence, independently from each other) Please check behavior when app is sent to background (suspended) and comes back to foreground. This currently also leads to an inconsistency on iOS and Android.

  2. torch is only activated when video stream is started and deactivated when stopped. Hence torchOn and pause depend on each other. Also in this case status would need to be invalidated when app is suspended (send to background and reactivated again, as this deactivates the torch and does not reactivate it currently)

My use case would work with variant 1 and 2. With variant 1 out of the box. I would like to activate the video stream and then directly like to enable the torch. Therefore I actually expected the torch only to be activated with the camera is active.
However, it could be a valuable feature for others if the torch could be activated independently from the camera, hence variant 2 might be also feasible but would have to cover more conditions, i.e. when camera gets activated reset torch to selected torchOn state, and also when app is resumed from background

@triniwiz triniwiz added the bug Something isn't working label Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants