Repository navigation
fix(ios): reject setAudioRoute when no route has the name - #914
Merged
Merged
Conversation
When no audio input had the given port name, setAudioRoute ended without resolving or rejecting, and the JavaScript promise never settled. It now rejects with "No audio route named <name>", and leaves the route as it was.
sboily
force-pushed
the
fix/ios-set-audio-route
branch
from
October 18, 2026 15:33
0a42b00 to
2c61542
Compare
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.
Problem
When no audio input had the given port name,
setAudioRoutereturned without resolving or rejecting: the JavaScript promise never settled.Fix
Reject with
No audio route named <name>. The route is left as it was.docs/api.mddocuments the rejection.Tests
On-device harness (the real
RNCallKeep.m, real CallKit), during an outgoing call:setAudioRoutewithSpeaker, the built-in microphone's port name,Speaker, the built-in microphone again,Speaker, thenNo such route, readingcurrentRoute.outputsafter each step.No such route: not settled after 3 sNo such route: not settled after 3 sAlso checked, and left unchanged: on both devices,
setAudioRoutewith the built-in microphone afterSpeakerbrings the output back to the receiver, also when the built-in microphone is already the preferred input (setPreferredInputremoves the speaker override). On iOS 27, master withsetActive:YESrestored ingetAudioInputs(removed by #863) behaves as master.