goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
24.04k stars 2.24k forks source link

web server side radio station for wave format #842

Closed monhi closed 6 years ago

monhi commented 7 years ago

First of all, thank you for your great library,

I would like write a simple audio web server and I would like it to have 4 channel online radio. My radio spec:

  1. Audio data is supposed to be sent from webserver to web clients as raw wave data (16 bits per sample, 8000 samples per second,).
  2. Each chunk of audio data contains 2000 samples which is equal to 250 millisecond of audio and 4 chunks are sent from server to client every second.
  3. I would like to use howler.js radio for client side. Now I have following questions
  4. I think I am supposed to add some header for each chunk of data, how that header is supposed to be filled. (as it is in wav format)
  5. how to configure howler in client side to get and stream those audio data.
  6. Does every famous web browser (chrome and firefox and IE) run wave audio streaming or not.

Best wishes,

goldfire commented 6 years ago

You don't need to do anything special to get streaming working with howler.js except setting html5 to true. The rest of the work would be on the server side. You can view a live streaming radio demo at https://github.com/goldfire/howler.js/tree/master/examples/radio.