0

How can i allow multiple users to stream audio coming from their machine over the network for multiple listeners i mean taking all the sound from their soundcard to the network,

I know this can be accomplish using icecast, edcast etc. but that will be only when the user installs these program to their device and start making configurations and a lot of work.

what i need is if its possible to do this without icecast just javascript, if we use webrtc it will be more like a voice call i guess,

but i need that audio streamed from device A to device B as if it was already in device B, am talking about playing music on the device and sound from mic at same time. is this possible with javascript? and multiple users can do this stream at same time.

watch dog
  • 187
  • 2
  • 15

1 Answers1

1

taking all the sound from their soundcard to the network [...] without icecast just javascript

There is no Web API for capturing all sound the computer plays that I know of.

You could maybe make something like this with WebRTC or other web APIs if the user's sound drivers expose a recording device (like the "Stereo Mix" recording device of olden days) that the user selects for your web app to use.

(As an aside, Icecast itself doesn't care where the audio comes from, it just accepts and redistributes OGG or MP3 streams. It's up to the casting client to figure out where the audio comes from.)

AKX
  • 152,115
  • 15
  • 115
  • 172
  • ok so it possible to put icecast on the server to allow multiple broadcasting from multiple users to multiple listeners? – watch dog Mar 31 '22 at 06:43
  • Icecast isn't able to mix multiple input sources into one output stream as far as I know. Liquidsoap ([see e.g. this answer](https://stackoverflow.com/a/26482731/51685)) could be able to do that, but users would still need an Icecast-compatible client, so that wouldn't be plain Web APIs either. – AKX Mar 31 '22 at 06:48
  • ok let me explain this using facebook. Let's say you are on facebook or twitter and you want to stream live to your followers, facebook allows you to do that but i want a situation where i'm playing a song on my pc and my followers are listening to that sound as if it were an uploaded mp3 file to the server if i pause it on my pc it should pause, if i speak thorough the mic my follwers should hear me, but i need this to be done by multiple users. is this possible? – watch dog Mar 31 '22 at 07:00
  • how can i achieve this on my own website? – watch dog Mar 31 '22 at 07:01
  • As I said in the original post, you can't capture music playing on your machine with just Web APIs unless there's a recording device that relays the music. Facebook's live broadcast quite surely doesn't capture all sound played on the broadcaster's machine either. You can use WebRTC and related technologies for a group chat, but that will require a server component nevertheless for signaling. – AKX Mar 31 '22 at 07:05
  • ok thank you i will make more research – watch dog Mar 31 '22 at 07:13