rodio
rodio copied to clipboard
Question: playing audio from an async stream
Hello, I like rodio but am struggeling to play audio from a network stream.
Problem
I have a stream of type futures_util::StreamExt
which has been fetched using the reqwest crate.
The problem is that this stream does not support Seek
and other traits required by rodio.
I tried buffering the stream, then playing it, but it leads to pauses during playing.
This is a live-stream so i cannot download the entire response but must play it in an iterator-like fashion.
I do not know how to convert this stream into a type which implements the required traits used by rodio.
Here is what this stream looks like:
let mut stream = reqwest::get(url).await.unwrap().bytes_stream();
The optimal solution would transform the stream and play it directly.