-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with streaming audio from WebRTC #581
Comments
There is no support for MediaStream right now, but I've marked it in the "future" milestone as it could make a good plugin. Performance shouldn't be an issue on the part of howler. |
Hi, any news about WebRTC support? |
Any news on this? |
1 similar comment
Any news on this? |
I assume howler will not supporting MediaStream any time soon |
Can you give an example of how this is supposed to work? |
|
Apologies if this is the wrong thread. Maybe someone will find it useful. I figured out how to make this stream over WebRTC. The secret is to start the audio timer (i.e. just attach it to a non-mounted audio node; see below). Then, obviously, you need to publish the audio media stream tracks to the other peer(s). Note: This is modified from example posted at: https://jsfiddle.net/chadananda/kvzrsx5t/84/ import { Howl, Howler } from "howler"; const audioURL = Howler.mute(false); // to initialize Howler internals // first disconnect // Howler.masterGain.connect(options.audioOutput) ?? // Start the audio timer (note, this doesn't have to be mounted to the DOM) // Note: html5 audio must be used for this to work const mediaStream = streamOutput.stream; // Audio tracks // ... |
@jzombie Could you please elaborate on this? It looks like the code sample provided plays directly from audioURL |
@vkarpuram I'm using Howler to mix several audio sources (i.e. instrument samples) into a single channel and broadcast them to several participants over WebRTC, who don't necessarily have Howler running on their end (each participant being able to trigger instrument samples playing over that mixed channel). Instantiating new Howler sounds and playing them automatically mixes them into the stream at this point, and no additional WebRTC negotiations are necessary to add / remove audio data this way (also have TTS servicing from Google mixed into the same channel [i.e. send request to Google / receive mp3 / add mp3 as Howler sound, and play it => all participants hear it]). At the moment, when I got it working, I thought I had accomplished something pretty cool, but later realize it's probably not what this thread is about. Maybe someone would still find it useful, regardless. |
Hi, at the end of 2022, is there any progress in the support of webrtc? |
Hello,
I'm interested in using Howler for a VR-ish web experience using WebRTC for audio transmission – does Howler accept mediastream src's and can it perform its transformations fast enough for real-time playback?
The text was updated successfully, but these errors were encountered: