ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
229 stars 414 forks source link

Permission Handling Issues in Microphone and Camera Capture Dialogs #8829

Open shauryag2002 opened 5 hours ago

shauryag2002 commented 5 hours ago

Describe the Bug

These issues are for Sample Test Details page:

  1. In Record audio modal,

    • [ ] Recording started timer starts before giving permission of microphone access in browser. Image
  2. In Open Camera modal,

    • [ ] After blocking access of camera , Empty container is there. Image

    • [ ] After clicking on Switch button, Camera stuck.

Camera and microphone permissions are not handled correctly. When the user does not grant permission for microphone or camera, the app does not handle the error appropriately, and permission errors are not clearly communicated to the user.

To Reproduce

Steps to reproduce the behavior:

  1. Click on Sample Test in sidebar.
  2. Click on any item's Sample Details.
  3. Go to the Audio Capture dialog or Camera Capture dialog.
  4. Deny the microphone or camera permission prompt.
  5. Observe that the recording timer starts before microphone permission is granted, and after blocking camera access, an empty container appears with the camera freezing upon clicking the switch button.

Expected Behavior

Video of Solution :

Record Audio modal:

https://github.com/user-attachments/assets/d3fe377e-5a98-4f9e-9c79-5225f29553fd

Desktop (please complete the following information):

shauryag2002 commented 5 hours ago

I am working on this issue.