Add isSpeaker to available devices list.

This is required so that EC "thinks" there is a speaker and an earpiece. If this condition is not met it will not show the toggle button.

So this fixes showing the toggle button on EX for earpiece speaker toggle.
This commit is contained in:
Timo
2025-06-26 18:07:45 +02:00
committed by Mauro
parent af5b670bf3
commit 8cc035e5af

View File

@@ -294,7 +294,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
let deviceList = if currentOutput.portType == .builtInSpeaker {
// This allows the webview to display the earpiece option
"{id: '\(currentOutput.uid)', name: '\(currentOutput.portName)', forEarpiece: true}"
"{id: '\(currentOutput.uid)', name: '\(currentOutput.portName)', forEarpiece: true, isSpeaker: true}"
} else {
// Doesn't matter because the switch is handled through the OS
"{id: 'dummy', name: 'dummy'}"