Skip to content

Conversation

@bmarty
Copy link
Member

@bmarty bmarty commented Dec 31, 2025

Content

Follow up PR for #5504 .
Last commits are cleanup.
Also I stored the playback speed index into a data store, since not doing this was causing issue when multiple voice messages was displayed on screen and also difference between the speed displayed on screen and the actual speed of the player. With the data store, everything stays in sync and is persisted across application restart. I do not see the point to persist a different speed depending on the account (in case multi account is used), but we may want to improve this later.

Motivation and context

Give the user the ability to change the playback speed of voice messages.

Screenshots / GIFs

See recorded ones

Tests

  • Send 2 voice messages in a room
  • Play the voice messages from the timeline.
  • Click the playback speed of any message to change the playback speed
  • Restart the application
  • The last playback speed is restored.

The same tests can be done when playing the voice messages from the media gallery (files tab).

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

@bmarty bmarty requested a review from a team as a code owner December 31, 2025 10:56
@bmarty bmarty requested review from jmartinesp and removed request for a team December 31, 2025 10:56
@bmarty bmarty added the PR-Feature For a new feature label Dec 31, 2025
@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/vdzirs

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 78.76106% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.35%. Comparing base (3973616) to head (1be2cb1).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...aries/mediaviewer/impl/gallery/ui/VoiceItemView.kt 65.00% 2 Missing and 5 partials ⚠️
...timeline/components/event/TimelineItemVoiceView.kt 80.64% 1 Missing and 5 partials ⚠️
...oid/libraries/voiceplayer/impl/VoicePlayerStore.kt 0.00% 6 Missing ⚠️
...player/impl/DefaultVoiceMessagePresenterFactory.kt 0.00% 2 Missing ⚠️
...s/designsystem/atomic/atoms/PlaybackSpeedButton.kt 95.00% 0 Missing and 1 partial ⚠️
...d/libraries/mediaplayer/impl/DefaultMediaPlayer.kt 0.00% 1 Missing ⚠️
...android/libraries/mediaplayer/impl/SimplePlayer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5963      +/-   ##
===========================================
- Coverage    81.40%   81.35%   -0.05%     
===========================================
  Files         2535     2538       +3     
  Lines        67626    67682      +56     
  Branches      8669     8677       +8     
===========================================
+ Hits         55049    55065      +16     
- Misses        9367     9404      +37     
- Partials      3210     3213       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Feature For a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants