To improve reliability and user experience, WebRTC media permission handling has been enhanced to ensure predictable behavior, accurate UI feedback, and session stability when browser-level permissions (microphone, camera, or screen sharing) are modified before or during an active call.
These enhancements eliminate silent failures, inconsistent UI states, and unintended session disruptions.
1. Permission Removal During an Active Call
The system now gracefully handles dynamic browser permission changes without terminating the call session.
1.1 Microphone Permission Revoked During Call
If a user revokes microphone permission while an audio or video call is in progress:
-
The outbound audio track is immediately stopped.
-
Other participants no longer receive audio from the customer.
-
A clear visual indicator is displayed on the Customer Widget
-
The call session remains fully connected.
-
Only the audio media track is affected.
When the user attempts to re-enable the microphone:
-
The system prompts the user to restore microphone access via browser settings.
-
Upon permission restoration, the audio track is re-established.
-
The UI state (mute/unmute) remains synchronized with the actual media state.
-
No double-toggle interaction is required.
1.2 Camera Permission Revoked During Video Call
If camera permission is revoked during an ongoing video call:
-
The outbound video track is immediately stopped.
-
The customer’s video stream is removed for other participants.
-
A placeholder image or "Video Off" indicator is displayed.
-
Audio remains unaffected (if microphone permission is intact).
-
The call session remains connected.
When the user attempts to re-enable video:
-
The system prompts the user to re-grant camera permission.
-
Upon approval, the video track is restored correctly.
-
The UI reflects the accurate video state without requiring repeated interaction.
2. Permission Removal Before Call Initiation
Improved validation has been introduced prior to call establishment to prevent inconsistent states.
2.1 Microphone Permission Not Granted
-
Call initiation is blocked if microphone access is required but not granted.
-
A clear error message is displayed, guiding the user to enable microphone access in the browser settings.
2.2 Camera Permission Not Granted (Video Call)
-
Video call initiation is blocked if camera access is required but not granted.
-
A clear validation message is displayed.
-
The customer widget establishes the call without a video stream.