Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-RTC

(Firebase + WebRTC Codelab)

About

This web application demonstrates realtime bi-directional quadraphonic audio streaming using WebRTC and the WebAudio API. It was built using the the WebRTC FirebaseRTC example.

This version contains changes to the repo that allows connected users to select two stereo audio devices (currently configured using Loopback) which are split and sent as 4 distinct mono sound "tracks" of a WebRTC destination stream.

One day Web standards will allow us to select one audio device with more than two channels, but for now selecting two stereo devices is a manageable workaround.

WebAudio API functions decompose the remote multichannel stream from a peer connection and routes the incoming 4 audio tracks to your soundcard's output channels.

Usage

You must setup a Firebase/Firestore account to host and deploy the project. More details can be found on the original example project page.

DAW Setup

You can stream quad from any audio application that allows you to select the audio output destination.

Your multichannel soundcard must be configured as a Quadraphonic output device in your OS system settings.

Screenshot 2025-09-05 at 4.12.19 PM.png

Download and install the Blackhole.

Blackhole acts as a virtual sound card and should be set as the output device in your DAW.

Set ‘Blackhole’ (with more than 2 outputs) as your Output Device.

Screenshot 2025-09-05 at 4.06.09 PM.png

Loopback is used to create two stereo devices from the 4-channel output from your DAW going to Blackhole.

image.png

image.png

Be sure to create a Monitor output in Loopback to hear your audio locally.

See the systems diagram below for an overview of the setup. systemsDiagram

Web Setup

To see the hosted project visit distant-streams.web.app.

Click the Distant Streams logo to bring up the configuration panel.

distantstreams config panel

Click the 'Search for Sound and Video Devices' button to and grant the browser permissions.

Select the two stereo Loopback devices and desired video feed.

Click 'Open Camera + Microphone' and Create Room.

Copy and paste the alphanumeric code to share it with your peer.

The connecting peer should follow the above process but should select 'Join Room' using the key geneated by the caller.

Adjust volume in the web-app's panel to balance levels.

About

Real-time bi-directional quadraphonic audio streaming using WebRTC.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages