feat(ios): user-toggleable speakerphone output
Add a "speaker output" override so users can route audio to the built-in speaker instead of the earpiece when no headphones/Bluetooth are connected. Previously the receiver was the only fallback on the default Voice Chat preset. The toggle inserts .defaultToSpeaker into the AVAudioSession category options (skipped for the A2DP mode, where it would break Bluetooth routing). It yields to connected BT/wired output and is orthogonal to preset matching. Exposed both as a call-bar button in VoiceControlsView and a persisted Settings toggle.
This commit is contained in:
@@ -23,6 +23,13 @@ struct SettingsView: View {
|
||||
}
|
||||
.accessibilityLabel("Audio preset")
|
||||
|
||||
Toggle("Speaker output", isOn: Binding(
|
||||
get: { router.forceSpeaker },
|
||||
set: { router.setForceSpeaker($0) }
|
||||
))
|
||||
.accessibilityLabel("Speaker output")
|
||||
.accessibilityHint("Routes audio to the speaker instead of the earpiece when no headphones are connected.")
|
||||
|
||||
if !router.hasBluetoothDevice && !router.hasWiredHeadset {
|
||||
Text("Connect Bluetooth headphones or a wired headset for more presets.")
|
||||
.font(.caption)
|
||||
|
||||
Reference in New Issue
Block a user