Skip to content

Implement Native Audio Switching for Element Call Widget on iOS/Android #3262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
13 of 18 tasks
toger5 opened this issue May 12, 2025 · 1 comment · Fixed by #3270
Open
13 of 18 tasks

Implement Native Audio Switching for Element Call Widget on iOS/Android #3262

toger5 opened this issue May 12, 2025 · 1 comment · Fixed by #3270
Labels
T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems

Comments

@toger5
Copy link
Contributor

toger5 commented May 12, 2025

Background

Element Call is implemented on our mobile platform via a one-fits-all widget approach. Web views on mobile platforms (Android, iOS) do not support properly selecting an audio output device from within the web view. Those mobile platforms "try" to find a "smart" auto selection.

Plan

In order to workaround the above constraints, on mobile we do not want to change the audio output/input via the web view, but instead do this all natively through the widget hosting native messenger app.

We still want that the control/change action of input/outbut audio lives in the widget / web view. In order to allow this we use js<->swift/cotlin web ffi calls.

Note the operating system can also change the audio input/output devices which is also signaled to the widget.

See FFI calls defined in: controlledOutput

The implementation wrt. Element Call widget is carried out in: #3270

Current state:

  • Element Call Audio device controls for mobile native audio device selection #3270
  • iOS
    • set the url flag to use controlled audio
    • audio output works (in general. the call audio is audible)
    • changing the output in the os (wither by connecting bt headphones or by using a native dialog) also updates the ui in EC
    • (ios specific) Earpiece mode is only delectable when on default audio output device
    • (ios specific) Earpiece mode works as good as it can.
    • changing the output in app also changes the actual audible output. (on ios this means that the button in the ui forwards us to the native picker)
    • initial list of devices is correct (on ios this is only about showing the earpice when starting with speaker mode)
    • all related PRs merged
  • android
    • set the url flag to use controlled audio
    • audio output works (in general. the call audio is audible)
    • changing the output in the os (wither by connecting bt headphones or by using a native dialog) also updates the ui in EC
    • changing the output in app also changes the actual audible output.
    • initial list of devices is correct (we had issues with the timing of sending over the initial devices)
    • all related PRs merged
@toger5 toger5 added the T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems label May 12, 2025
@toger5 toger5 changed the title Configure native audio from ElementCall widget. Configure native audio from ElementCall widget May 12, 2025
@fkwp fkwp changed the title Configure native audio from ElementCall widget Implement Native Audio Switching for Element Call Widget on iOS/Android May 20, 2025
@toger5
Copy link
Contributor Author

toger5 commented May 22, 2025

I will reopen this since it also tracks the mobile progress.

@toger5 toger5 reopened this May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant