Skip to content

regression: audio attachments show no duration and cannot seek until played - #41592

Closed
KevLehman wants to merge 1 commit into
release-8.7.0from
regression/audio-attachment-duration-seek
Closed

regression: audio attachments show no duration and cannot seek until played#41592
KevLehman wants to merge 1 commit into
release-8.7.0from
regression/audio-attachment-duration-seek

Conversation

@KevLehman

@KevLehman KevLehman commented Jul 27, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Since the persistent audio player (#41120), message audio attachments render stateless controls against a single shared <audio> element. Duration and seek state only exist for the currently active track, so every unplayed audio message showed 0:00 and a locked slider (max = 0), and clicking the slider restarted playback from the beginning.

  • Added useAudioDuration: loads the audio metadata off-DOM (preload='metadata') so each attachment knows its duration before ever being played, including the Infinity-duration workaround for MediaRecorder files (same behavior the previous per-message fuselage AudioPlayer had).
  • AudioPlayerControls now falls back to that metadata duration when the track is not active, making the duration label and the slider range correct on render.
  • play(track, at?): seeking an inactive attachment now starts playback at the clicked position (pending seek applied on loadedmetadata).

Issue(s)

Steps to test or reproduce

  1. Send an audio message (or open a room with one).
  2. Without playing it, the duration is shown and the slider is draggable.
  3. Drag/click the slider on an unplayed audio: playback starts at that position.

Further comments

Client-only fix. Storing the duration in the attachment at upload time would avoid the extra metadata request and remains a possible follow-up.

Review in cubic

@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b692c1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4eb63564-0ef4-442c-b0e1-8afb61ee4448

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dionisio-bot

dionisio-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 49.09091% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.63%. Comparing base (d59ea47) to head (3b692c1).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.7.0   #41592      +/-   ##
=================================================
- Coverage          68.64%   68.63%   -0.02%     
=================================================
  Files               4138     4139       +1     
  Lines             159422   159471      +49     
  Branches           28179    28178       -1     
=================================================
+ Hits              109433   109449      +16     
- Misses             44852    44876      +24     
- Partials            5137     5146       +9     
Flag Coverage Δ
e2e 58.90% <60.00%> (+0.02%) ⬆️
e2e-api 45.62% <ø> (+0.26%) ⬆️
unit 70.58% <18.18%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

@KevLehman KevLehman closed this Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant