codysherman / 2nfm

Share your screen and computer's audio via WebRTC!
https://2n.fm
BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Support stereo audio #226

Open sammoore opened 3 years ago

sammoore commented 3 years ago

I've gotten the request to add stereo audio. I was putting this off because of a more ambitious overhaul to the SDP semantics, but it seems easy enough fix and will make me happier too.

A relevant TODO.

sammoore commented 2 years ago

I've actually found that Stereo does work under certain specific conditions, but it needs to be enabled on the host/streamer end, and possibly some additional code on the client/streamee side of things to ensure it always works (TBD, see last paragraph).

The requirement for anything to work at all is for the host/streamer to enable the Chrome flag #enable-webrtc-capture-multi-channel-audio-processing -- which enables capturing Stereo audio in the first place.

Using Firefox as the streamee, stereo audio will now work. However, if the client/streamee is using Chrome, the client still gets (?) mono audio. Tested as the streamee by myself with Chromium 90, and by @codysherman assumingly on Chrome 96/latest.