Skip to content

Take the other two names for a WAV - #45

Merged
skjnldsv merged 1 commit into
mainfrom
fix/wav-mime-aliases
Sep 18, 2026
Merged

skjnldsv merged 1 commit into
mainfrom
fix/wav-mime-aliases

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Ported from nextcloud/viewer#3387 by @ixgate-lpeters, whose diagnosis this is: Nextcloud Mail filters attachments against what the viewer will open, and a WAV sent from Thunderbird arrives as audio/vnd.wave, so it never reached the audio handler while an MP3 beside it did.

The same container goes by three names: audio/wav in most tooling, audio/vnd.wave registered in RFC 2361 and sent by mail clients, audio/x-wav from older Windows exports. Only the first was listed.

The declared type does not decide what plays, which is worth stating because the list is named as though it does. Serving one WAV under each name and playing it in both engines:

declared type Chromium Firefox
audio/wav plays plays
audio/vnd.wave plays plays
audio/x-wav plays plays
application/octet-stream plays plays

canPlayType('audio/vnd.wave') answers "no" in both, and the file plays anyway: a media element reads the bytes. So this list decides what the viewer offers to open, nothing more.

Note

Files never produces these two. The server maps wav to audio/wav alone, so they only arrive from callers that hand the viewer a node with a declared type of their own, which is exactly the Mail case above.

The list holds other entries no engine claims, audio/vorbis among them, and the variable is called browserSupportedMimes. That is a separate question about what the list means, raised in #46 rather than changed here.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

A WAV is served as audio/wav by most tooling, as audio/vnd.wave by mail
clients (RFC 2361 registered it) and as audio/x-wav by older Windows
exports. Only the first was listed, so an attachment arriving as one of
the other two was never offered to the handler: Nextcloud Mail filters
what it shows against the viewer, and a WAV sent from Thunderbird had no
player while an MP3 beside it did.

The declared type does not decide what plays. The same file was served
under all three names and under application/octet-stream, and Chromium
and Firefox played every one of them: a media element reads the bytes.
The list is what the viewer offers to open, not what a browser claims.

Co-authored-by: Lucas Peters <149142920+ixgate-lpeters@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added status: review Waiting for reviews type: bug 🐛 Something isn't working AI assisted labels Sep 18, 2026
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.00%. Comparing base (1c56730) to head (e3d8a31).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #45   +/-   ##
=======================================
  Coverage   87.99%   88.00%           
=======================================
  Files          36       36           
  Lines        2508     2510    +2     
  Branches      525      525           
=======================================
+ Hits         2207     2209    +2     
  Misses        297      297           
  Partials        4        4           

☔ View full report in Codecov by Harness.
📢 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.

@skjnldsv
skjnldsv merged commit 4413798 into main Sep 18, 2026
18 checks passed
@skjnldsv
skjnldsv deleted the fix/wav-mime-aliases branch September 18, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted status: review Waiting for reviews type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant