Merge pull request #2645 from krille-chan/krille/set-web-audio-player-mimetype
chore: Follow up audio player mimetype
This commit is contained in:
commit
4bbba18cc0
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
audioPlayer.setFilePath(file.path);
|
audioPlayer.setFilePath(file.path);
|
||||||
} else if (kIsWeb) {
|
} 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);
|
final url = html.Url.createObjectUrlFromBlob(blob);
|
||||||
await audioPlayer.setAudioSource(AudioSource.uri(Uri.parse(url)));
|
await audioPlayer.setAudioSource(AudioSource.uri(Uri.parse(url)));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue