How we can stream audio file or build stream api with CF

Hi Team,

We are planning to serve some audio files to our mobile and website users and we are able to create a streaming API by using the spring framework where we read files in chunks and send in responses.

But we are unable to find any features in Cloudflare to serve an audio file in a stream way.
we already have some audio files in R2 and we want to read those files in a stream fashion so users are not required to wait to load the file first and play after.

So is there any way to play audio/read files from R2 without loading the whole file in the browser like Video Streaming?

Thanks in advance.

1 Like