Repository navigation
Conversation
Signed-off-by: yuri-zeta <153580955+yuri-zeta@users.noreply.github.com>
|
Nice catch @yuri-zeta |
|
Thanks for the PR! As far as i see you're right that the recordings are MPEG-4/AAC and that .mp3 is the wrong extension for them. The Android app sets so the right file extension would be But unfortunately we can't merge this as it is. After this change, voice messages show up as plain audio files instead of voice messages. The Talk server only keeps the voice-message type if the uploaded file's type is audio/mpeg or audio/wav. Otherwise it silently drops the type:
The server determines the file's type from its extension. A .m4a file becomes audio/mp4, so the server drops the voice-message type, and every client shows the recording as a regular audio file. The .mp3 name is wrong, but it's what currently gets the file through this check. Also the iOS sends "mp3" as extension name.
Switching to .m4a would need two steps:
So this is more complicated than just renaming the file extension on clients. I was not able to reproduce the issue that mp3's could not be played on Talk iOS 25.0.2. Could you also provide which Android device / Android version / Android Talk version you used for recording? I will discuss with my team. |
Fixes #7040
Voice messages are recorded with
MediaRecorder.OutputFormat.MPEG_4andAudioEncoder.AAC, but were saved with an.mp3suffix, so the server storedaudio/mpegfor MP4 data. Some clients (iOS) trust the extension and fail to play them. This changes the suffix to.m4a(server mimetypeaudio/mp4); recording parameters are unchanged. Tests that used.mp3for the recording path are updated. Old.mp3files already uploaded are unaffected.🏁 Checklist
Not built or tested locally (change is a suffix constant plus test strings).