EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

Fix: permission issues for video and audio message

Open abirc8010 opened this issue 1 year ago • 9 comments

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.

abirc8010 avatar Dec 24 '24 12:12 abirc8010

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 avatar Dec 26 '24 09:12 smritidoneria

@smritidoneria You are right ! Let's prompt user to enable the permission and then we can start the recording

Spiral-Memory avatar Jan 01 '25 14:01 Spiral-Memory

@abirc8010 Have you made the required change ?

Spiral-Memory avatar Jan 05 '25 10:01 Spiral-Memory

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.

abirc8010 avatar Jan 05 '25 10:01 abirc8010

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

Spiral-Memory avatar Jan 05 '25 10:01 Spiral-Memory

Can you show me, how RC behaves, if we deny it

Spiral-Memory avatar Jan 05 '25 10:01 Spiral-Memory

Can you show me, how RC behaves, if we deny it

@Spiral-Memory , RC disables the icons

abirc8010 avatar Jan 05 '25 11:01 abirc8010

Okay then let's follow that @abirc8010 Make the modifications accordingly, resolve the conflicts and we are good to go

Spiral-Memory avatar Jan 05 '25 11:01 Spiral-Memory

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?

abirc8010 avatar Jan 05 '25 11:01 abirc8010