Added new demos: WebAudio and Virtual Backgrounds #2941
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As te title says, this adds nothing to Janus, but only adds a couple of demos focused entirely on the client side. Specifically, I added a couple of very basic demos:
webaudio.html/:js
shows how to use Web Audio to do some processing of what comes from the microphone, before sending it to Janus; it's very basic, since on the capture side it only adds a compressor, where you can dynamically tweak the parameters via some form inputs; the audio is then sent to the EchoTest plugin, which sends it back, and so WebAudio is used again just to visualize the output as well (which should help see the effect of the compressor).virtualbg.html/.js
instead shows how you can use MediaPipe to add a virtual background to the local camera before sending it to Janus: since the EchoTest is used here as well, you can see that what you send is exactly what you receive.Both demos are quite basic and are not meant to provide something production ready: there's much more you can do with Web Audio than that, for instance, and the same could be said for virtual backgrounds (where you may want to blur, instead of using a background, or use a green screen like this excellent webrtcHacks blog post describes).
That said, hopefully they'll provide useful to people that want to tinker with features like this, as I wanted to stress out these are things you typically do on the client side, and have nothing to do with Janus.