element-x-android
element-x-android copied to clipboard
EC: Add PoC for native audio output selector
Content
Motivation and context
Screenshots / GIFs
Tests
- Step 1
- Step 2
- Step ...
Tested devices
- [ ] Physical
- [ ] Emulator
- OS version(s):
Checklist
- [ ] Changes have been tested on an Android device or Android emulator with API 24
- [ ] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
- [ ] Pull request is based on the develop branch
- [ ] Pull request title will be used in the release note, it clearly define what will change for the user
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] You've made a self review of your PR
:iphone: Scan the QR code below to install the build (arm64 only) for this PR.
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/85waVz
Codecov Report
Attention: Patch coverage is 18.91892% with 150 lines in your changes missing coverage. Please review.
Project coverage is 80.31%. Comparing base (
56c9083) to head (d996cf2). Report is 14 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #4663 +/- ##
===========================================
- Coverage 80.47% 80.31% -0.16%
===========================================
Files 2140 2140
Lines 56756 56887 +131
Branches 7110 7150 +40
===========================================
+ Hits 45672 45688 +16
- Misses 8649 8765 +116
+ Partials 2435 2434 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
After https://github.com/element-hq/element-x-android/pull/4743 this should now be ready to review.
I have tested this and I am loosing the audio output when selecting Default (Built-in speaker).
Actually it was due to the fact that this is not the same volume mapping. For earpiece, the In-call volume is used, for Default, this is the Media volume. I am not sure if we can improve this?
Actually it was due to the fact that this is not the same volume mapping. For earpiece, the
In-call volumeis used, forDefault, this is theMediavolume. I am not sure if we can improve this?
Oh, that's tricky. I'm not sure if we can make they use the same volume rocker or have some other way to make this transition seamless..
But it seems that the audio input (in EX) was not working. I could not hear any voice coming to Element Web (sound alert was working so this is not a volume/mute problem on the browser)
Did you have video output or was that also failing? I've had one call this morning where the encryption keys exchange seemed to fail and that resulted in the 2 users seeing each other as present in the call but no video or audio getting through to the other.
I have tested it again and this is the status for a call with EW and EX and EW does not render incoming video nor audio. The other side is working (EX render video and play audio)
I have tested it again and this is the status for a call with EW and EX and EW does not render incoming video nor audio. The other side is working (EX render video and play audio)
Could you check you don't have set a custom Element Call URL? On EW you can use/devtools for that.
Actually it was due to the fact that this is not the same volume mapping. For earpiece, the In-call volume is used, for Default, this is the Media volume. I am not sure if we can improve this?
So I have good news and bad news after checking other apps and how they handle this issue:
- The good news is I've found a way to make the audio use always the 'in call' stream and it would simplify the code.
- The bad news is it's based on always using the deprecated APIs (the < API 12 we already have in place in this PR), which I'd rather not use and could be removed in the not-so-far future.
I'll check if there's any alternative to this, but I'm not really hopeful...
I have not set any custom url on EW. For the volume I think it is acceptable if it's an OS limitation... But can be misleading for user (like me) thinking that the audio is not working when switching the output. There is maybe a way to read the volume level and warn the user that the volume is probably too low (I think I have seen other apps doing that, a long time ago, I do not remember which one).
@bmarty could you retry with the latest changes?
The latest changes should fix the issue with the audio for the speaker initially not following the right volume rocker, but now we need https://github.com/element-hq/element-call/pull/3309.
The latest changes should fix the issue with the audio for the speaker initially not following the right volume rocker, but now we need element-hq/element-call#3309.
Rebased after upgrading the Element Call version in https://github.com/element-hq/element-x-android/pull/4832, which contains the changes needed to fix the audio for the device selected by default.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code