bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
1.97k stars 841 forks source link

Bug on Windows when player.play #1818

Open Bilonik opened 2 months ago

Bilonik commented 2 months ago

Checklist

Current bug behaviour

Activate failed to create mediasink. Call OutputNode::GetUINT32(MF_TOPONODE_MAJORTYPE) for more information.MediaEngine error

Expected behaviour

Play sound

Steps to reproduce

Works on iOS and Android

final player = AudioPlayer(); await player.play(AssetSource("audio.mp3"));

Code sample

Code sample ```dart void main() { } ```

Affected platforms

Windows

Platform details

Windows 10 and 11

AudioPlayers Version

6.0.0

Build mode

debug, release

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

my relevant logs
Full Logs ``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```

Related issues / more information

No response

Working on PR

no way

Bilonik commented 2 months ago

The 'xyz.luan/audioplayers/events/30397293-c286-43db-8767-17482e66e6b2' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.

tranhuudang commented 2 months ago

Yes, my app crash right after I hit the play button and receive that error in production.

weilong333 commented 1 month ago

got the same error also..but it seems like randomly happen

Ali-Fadaei commented 1 month ago

this causes crash on production!!! there isn't any fix or workaround?!

tranhuudang commented 2 weeks ago

If your build using msix to build for production, you can update the the version msix: ^3.16.8. Some main x64 dll files in msix packages causing crash when using with some other packages. I hope this help you solve the problem.