Open Binozo opened 1 month ago
Took a look into the internals and it seems that that StreamedBytesSource
would need a reimplementation of almost every api 😬
Most of those expect a full bytestream to feed into their dedicated audioplayer like android does
Checklist
Use case / Problem
Hello there 👋
currently I am developing an app for my raspberry pi running on flutter-pi. flutter-pi supports only this audio package so that's why I chose it (and it looks decent too).
In this use case the audio data is being live streamed by my server in a format like this:
Stream<Uint8List>
. I looked through the wiki and there is no real option for live streamed data besideBytesSource
andUrlSource
but those only support audio data which is already fully downloaded.I think it would be a great addition for this package
Proposal / Solution
I would suggest a new type of
Source
likeStreamedBytesSource
for example. With that new type you would constantly add data to the buffer which is being read by this package. I think implementing this new type of source and playing the actual data likeBytesSource
does would be a good way to implement that.Example Code
Example Code
```dart void main() { final player = AudioPlayer(); // Pseudo stream but could be implemented somehow like this StreamAffected platforms
Android, iOS, web, Windows, Linux, macOS
Platform details
I think it'll work on every platform which implements
BytesSource
because the way it plays the audio could be implemented likeBytesSource
does.Audio Files/URLs/Sources
No response
Mockups
No response
Related issues / more information
I think this feature would be a great addition and I'm looking forward to do the actual implementation myself :)
Currently I am planning to wait for some feedback to this feature request until I do the actual implementation
Working on PR
yeah