Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
I want to send a stream of MP3 audio in chunks to client side and play it.

Any advice?

What I have tried:

Currently playing the stored file directly using complete url.
E.g: http://www.domain.com/files/abc.mp3
Posted
Updated 23-Aug-17 1:21am

1 solution

Take a look at this Stack Overflow question's answers:
c# - Streaming MP3 Chunks on ASP.NET - Stack Overflow[^]
 
Share this answer
 
Comments
Manudhiman 23-Aug-17 7:35am    
Thanks for the reply ProgramFOX.
I've already been through it..
I'm able to send data but don't know how to process it on client side.
Thomas Daniels 23-Aug-17 7:38am    
You don't process it any different than as if you'd send the whole file as once. You could just request this in a <media>-tag, for example.
Thomas Daniels 23-Aug-17 7:39am    
In my previous comment, I meant <audio> rather than <media>
Manudhiman 23-Aug-17 7:41am    
But such tag would be needing a complete URL to file. Am I right?
If not, then, May I have an example please?
Thomas Daniels 23-Aug-17 7:44am    
You need to have an URL that executes the code to send the data chunk-by-chunk.

I can't really give an example because I don't know if you're using WebForms or MVC. In case of WebForms, I wouldn't know myself, it's been a long time since I used Webforms. But you can surely find examples of it online.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900