Merge pull request #2645 from krille-chan/krille/set-web-audio-player-mimetype

chore: Follow up audio player mimetype
This commit is contained in:
Krille-chan 2026-03-04 15:01:09 +01:00 committed by GitHub
commit 4bbba18cc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -204,7 +204,7 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
if (file != null) {
audioPlayer.setFilePath(file.path);
} else if (kIsWeb) {
final blob = html.Blob([matrixFile.bytes], 'audio/mpeg');
final blob = html.Blob([matrixFile.bytes], matrixFile.mimeType);
final url = html.Url.createObjectUrlFromBlob(blob);
await audioPlayer.setAudioSource(AudioSource.uri(Uri.parse(url)));
} else {