Skip to content

Conversation

@esphynox
Copy link

@esphynox esphynox commented Jan 8, 2026

First time contributor checklist

Contributor checklist

  • My commits are rebased on the latest main branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
  • iPhone 13 Pro, iOS 26.2

Description

This PR fixes an incorrect file-extension mapping for the MIME type audio/mpeg, which currently resolves to .mpg and causes audio messages to be exported and shared as video files on iOS.

The mapping is updated from:

"audio/mpeg": "mpg" => "audio/mpeg": "mp3"

Context

.mpg / .mpeg refer to MPEG Program Stream container formats, which are designed to multiplex video and audio and are therefore treated as video containers by operating systems and media frameworks:

“Program stream (PS or MPEG-PS) is a container format for multiplexing digital audio, video and more.”
https://en.wikipedia.org/wiki/MPEG_program_stream

As a result, using .mpg for audio/mpeg causes exported audio files to be misclassified as video.

By contrast, the official IANA registration for audio/mpeg (RFC 3003) lists the valid file extensions as:

File extension(s): .mp1, .mp2, .mp3
https://www.iana.org/assignments/media-types/audio/mpeg

Mapping audio/mpeg to .mp3 aligns with the MIME specification and OS media classification behavior.

Result

  • Audio messages with MIME type audio/mpeg are exported with the .mp3 extension
  • iOS correctly recognizes them as audio files
  • Sharing to Files, Notes, and other apps behaves as expected

Testing

  • Sent an MP3 file to the iOS Signal app and confirmed it renders as an audio message
  • Long-pressed the message and pressed Share
  • Verified that file in share sheet uses the .mp3 extension and displays audio type and not .mpg extension and video type
  • Confirmed no regression in in-app audio playback

Fixes #6140

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.

MP3 audio file is "interpreted" as an MPEG video file, despite correctly rendering as an audio message.

1 participant