regression: audio attachments show no duration and cannot seek until played - #41592
regression: audio attachments show no duration and cannot seek until played#41592KevLehman wants to merge 1 commit into
Conversation
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 showed0:00and a locked slider (max = 0), and clicking the slider restarted playback from the beginning.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 fuselageAudioPlayerhad).AudioPlayerControlsnow 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 onloadedmetadata).Issue(s)
Steps to test or reproduce
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.