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

Add Torch/Flashlight support #65

Merged
merged 7 commits into from
Aug 20, 2024
Merged

Conversation

GovernmentPlates
Copy link
Member

@GovernmentPlates GovernmentPlates commented Jul 19, 2024

This PR allows (supported) devices to toggle the camera torch/flashlight when on the check-in scanner page (for low-light conditions).

TODO:

  • Fix state usage (otherwise this causes the camera to reload after toggling the torch which isn't great)
  • Hide away the torch toggle button when the device doesn't support it
  • Switch off the torch (if enabled) after navigating away from the scan page

@GovernmentPlates GovernmentPlates self-assigned this Jul 19, 2024
@tomasr8
Copy link
Member

tomasr8 commented Jul 23, 2024

Soon to be deployed here: https://indico-checkin-test-4.app.cern.ch

@GovernmentPlates GovernmentPlates force-pushed the torch-support branch 3 times, most recently from aa54125 to f4887c3 Compare July 31, 2024 12:20
@GovernmentPlates GovernmentPlates marked this pull request as ready for review July 31, 2024 12:20
src/Components/QrScanner/TorchButton.tsx Outdated Show resolved Hide resolved
src/Components/QrScanner/TorchButton.tsx Show resolved Hide resolved
src/Components/QrScanner/QrScannerPlugin.tsx Outdated Show resolved Hide resolved
src/Components/QrScanner/QrScannerPlugin.tsx Outdated Show resolved Hide resolved
* Improve error handling
* Improve torch switch-off handling
* Remove unnecessary react fragements
* Add visual feedback to torch button interactions
Copy link

📝 Lighthouse report

@tomasr8 tomasr8 merged commit df30933 into indico:master Aug 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants