Skip to content
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

Use libopus encoder for devices that don't have proper support for it in the OS #7010

Closed
jmartinesp opened this issue Sep 5, 2022 · 1 comment
Assignees
Labels
A-Voice-Messages O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@jmartinesp
Copy link
Member

Your use case

What would you like to do?

Use libopusencoder for some devices with Android version >= 10.

Why would you like to do it?

Since Android 10, the OS provides an Opus encoder in the OS so instead of using VoiceRecorderL which wraps an embedded libopus library to encode voice messages we use MediaRecorder with that codec. However, it seems like some Android ROMs or some vendors don't match this standard and some devices with Android OS >= 10 lack this encoder support.

How would you like to achieve it?

We can try to check if the encoder is present in the OS and if it's not, use the 'fallback' encoder based on libopus.

Have you considered any alternatives?

Other alternatives would be:

  1. Using the libopus encoder for all versions, but it was only implemented as a workaround to keep retro-compatibility with older Android versions. Instead of maintaining yet another dependency, we should always try to use the official implementation.
  2. Not fixing this issue at all, since it's not an Element problem, but an issue with some ROMs or device vendors. However, working around this issue doesn't seem to be too difficult and those users will benefit from having the voice recorder feature working.

Additional context

No response

Are you willing to provide a PR?

Yes

@jmartinesp jmartinesp added T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements A-Voice-Messages S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Sep 5, 2022
@jmartinesp jmartinesp self-assigned this Sep 5, 2022
@jmartinesp
Copy link
Member Author

Created the issue based on the input from #3904 (comment) and following comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Voice-Messages O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

1 participant