Add ability to prevent unmute for active calls#118
Open
jerry2013 wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a per-call “allow unmute” flag so consumers can prevent an active call from being unmuted (primarily via CallKit on iOS).
Changes:
- Added a new JS API
setAllowUnmute(sessionId, value, ...)to send the flag to native code. - Implemented
setAllowUnmuteon iOS and enforced it by rejecting unmute requests inperformSetMutedCallAction. - Added an Android
setAllowUnmuteaction handler (currently a stub that always succeeds).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| www/CordovaCall.js | Exposes setAllowUnmute to JS and forwards sessionId + boolean to native. |
| src/ios/CordovaCall.m | Stores allowUnmute per active call, defaults it to YES, and blocks CallKit unmute actions when disabled. |
| src/ios/CordovaCall.h | Declares the new iOS plugin method. |
| src/android/CordovaCall.java | Adds an execute branch for setAllowUnmute (currently returns success without enforcing behavior). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jerry2013
commented
Jun 5, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jerry Hu <4749863+jerry2013@users.noreply.github.com>
…ing error management
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for controlling whether a call can be unmuted on iOS by adding an
allowUnmuteproperty to active calls. This allows the app to programmatically prevent users from unmuting during a call. The Android implementation does not support this feature and returns an error if called. The main changes are grouped by platform below.iOS: Allow Unmute Feature
setAllowUnmutetoCordovaCallthat allows toggling whether unmuting is permitted for a specific call session. This updates theallowUnmuteproperty in the active call entry. (src/ios/CordovaCall.h,src/ios/CordovaCall.m) [1] [2]allowUnmuteis set toNO, providing an error message and reverting the UI toggle. (src/ios/CordovaCall.m)allowUnmute: YES. (src/ios/CordovaCall.m)JavaScript API:
setAllowUnmuteto the JavaScript interface, allowing apps to call this functionality from JS. (www/CordovaCall.js)Android:
setAllowUnmutethat always returns an error, as this feature is not supported on Android. (src/android/CordovaCall.java)