Fix: permission issues for video and audio message
Brief Title
Prevent audio icon from changing its state and video icon to display modal if permissions are not granated and display an error toastbar message
Acceptance Criteria fulfillment
- [ ] Ensure the recorder does not start without microphone or camera permissions.
- [ ] Display an error message via the toast bar when permissions are missing.
- [ ] Prevent the recording state from changing if permissions are denied.
Fixes #729
Video/Screenshots
Screencast from 2024-12-24 17-38-01.webm
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-730 after approval. Contributors are requested to replace <pr_number> with the actual PR number.
hey @abirc8010 ,I believe that prompting the user to grant permissions might provide a better user experience. By proactively guiding users to enable the necessary permissions, we can prevent confusion and make the process more seamless. Instead of just showing an error message, prompting users to grant permissions directly can help ensure they understand the action needed to proceed.
your thoughts @Spiral-Memory ?
@smritidoneria You are right ! Let's prompt user to enable the permission and then we can start the recording
@abirc8010 Have you made the required change ?
Hey @Spiral-Memory, I haven't finished it yet. I researched how to ask the user to enable the permission by opening popup in the browser even after they've denied it, but I couldn't find any method to trigger the permission popup programmatically.
Hey @Spiral-Memory, I haven't finished it yet. I researched how to ask the user to enable the permission by opening popup in the browser even after they've denied it, but I couldn't find any method to trigger the permission popup programmatically.
If they have denied it, then your approach is fine, i thought it is for the initial start
Can you show me, how RC behaves, if we deny it
Can you show me, how RC behaves, if we deny it
@Spiral-Memory , RC disables the icons
Okay then let's follow that @abirc8010 Make the modifications accordingly, resolve the conflicts and we are good to go
Hey @Spiral-Memory , although I understand that we are aligning the behavior with RC, but wouldn't it be better to display a toast notification prompting the user to enable permissions for video or audio messages?