fix(ios audio): route earpiece reliably; stop fighting WebKit's audio session
Speaker worked but the earpiece was silent, and call audio flickered on speaker then dropped. Causes: (1) the category set .defaultToSpeaker, so overrideOutputAudioPort(.none) fell back to the loudspeaker instead of the receiver; (2) setSpeaker re-ran setCategory+setActive on every toggle mid-call, tearing down the audio unit WebKit's WebRTC engine was using and silencing the earpiece route. Fix: drop .defaultToSpeaker (drive the port explicitly), make setSpeaker flip ONLY overrideOutputAudioPort, and observe routeChangeNotification to re-assert the chosen route when WebKit reconfigures the session at call start / device change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "audio-route",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "iOS earpiece/speaker audio route toggle for Biz Connect",
|
||||
"main": "dist/plugin.cjs.js",
|
||||
"module": "dist/esm/index.js",
|
||||
|
||||
Reference in New Issue
Block a user