audioplayers
audioplayers copied to clipboard
windows platform support
flutter desktop is not stable, but we all know it’s future of desktop app development. audioplayer works fine on android ios web and macos but only windows does not have support for it. thous it is experimental i think we should support windows platform in early stage
not only windows, but linux also needs support.
anyway, we don't have the availability to implement this support at the moment. but we would gladly accept PRs.
https://medium.com/flutter-community/towards-full-audio-support-in-flutter-5d15800cdb8b
refering this blog, sound player seems like a solution for windows audio support, (i understand this is off topic, but) will there be any way that i can make plugin with this for windows? (since it's so hard to find any possible example for making flutter windows plugin)
I have a branch with a basic Windows template setup, but I haven’t had time to work on it lately. Feel free to have a look -> Windows branch However this branch also has some iOS changes I made for a personal project.
https://github.com/ddonze/audioplayers/blob/384386bd7b69ccce7525fe1c07ac3084e4c136d5/windows/audioplayers_plugin.cpp#L105
haven't run it, but seems like it would work as expected. why wont you submit pr for this? @ddonze
FYI, the "conversion" from std::string
to std::wstring
on line 104 will not work if there is any unicode in the path. I would recommend using std::filesystem::u8path
to construct a path from the UTF-8 (which is what it is, not ASCII) path you are given.
@stuartmorgan Yeah, this is literally just a plug-in template file dropped in and wired up to load correctly. But there has been no real development on the actual audio implementation beyond initial tinkering. Feel free to write your own code to fill in the blanks.
@softmarshmallow The implementation doesn’t really work well or reliably. Most of the work in the branch was just getting the Windows plugin setup. Any actual audio implementation was just me tinkering. Definitely not PR ready
May use this https://github.com/alexmercerind/flutter_audio_desktop
Hi there everyone 👋!
@luanpotter @erickzanardo @khismatullin @softmarshmallow
I saw that you guys mentioned & asked for support from my repository. My project flutter_audio_desktop is very simple & basic at the moment... I made it for personal usage & supports both Windows & Linux audio playback right now, as there were (are) not any flutter audio libraries supporting Windows & Linux yet. (It's all in C++ & uses exact same code for both Linux & Windows except for the Platform Channels obviously)
I'd love to add support for Windows & Linux in this project. I'll try to fork this project tomorrow (mind the time zones) & make a good PR soon for Windows & Linux support ❤
My project currently has (for Windows & Linux):
- Playing local files
- Play/Pause/Stop
- Getting file duration
- Seeking
- MP3, OGG, FLAC, WAV support
- (I'll add streams along the way as I add support to this project in the same PR).
@alexmercerind awesome! Thanks alot for your contribution
@alexmercerind how is your project coming along? Really hoping to get this for my project and don't want to duplicate your work.
copy from audioplayers_web.dart and modified some method with base.dll
can easy to realize audioplayers in windows and linux.
Basic functions have been implemented like play
pause
stop
getDuration
and more others can be added the same way
https://github.com/mabDc/audioplayers/tree/windows
more of bass.dll
doc at
http://www.un4seen.com/doc/#bass/bass.html
http://www.un4seen.com/doc/#bass/BASS_ChannelPlay.html
As discussed in #944, bass.dll is proprietary and requires hefty licensing fees, so it's not fit for inclusion in an open-source Flutter library.
libao, on the other hand, is open-source, supports Windows AND Linux, and already has a Flutter package. Seems like perhaps the best fit here.
The Windows implementation should use Media Foundation. Since there hasn't been much movement around this issue for a while, would you be willing to accept a PR using it? I'm willing to implement and make this PR. I've already implemented an incomplete video_player version using it, so I'm 100% comfortable porting it to just audio.
@azchohfi Are you working on the PR ?
Yes, pretty much done, but I want to hear back if this would be accepted or not, before sending the PR.
@azchohfi look at @erickzanardo quote . but we would gladly accept PRs.
@azchohfi You are amazing. I hope you'll get an answer soon.
I'd like to ask you whether you could give me direction with this issue: https://github.com/bluefireteam/audioplayers/issues/1038 . I'm desperate on this one and need this to be fixed and the authors of this package have not responded for months. I'd love to fix it but have no idea where to start. I'm sure the same issue is also present on the Windows platform, too. Where should I start to fix this please? Is this a hard issue to tackle in your opinion?
I don't think #1038 affects this implementation at all. Win32's don't have the concept of background (not like iOS/Android), so it should not be an issue.
flutter desktop is not stable, but we all know it’s future of desktop app development.
By the way, after two years: windows is stable now 🎉
Hope to see windows support soon...
@azchohfi - I see that your PR is already merged. Does this mean that Windows is now supported?
@eximius313 audioplayers 0.x doesn't support windows, but 1.0.0-rc.1 does.
Implemented via #1068