This is a variant of the Echo Test and Canvas demos meant to showcase how you can use libraries like MediaPipe to add a virtual background to your webcam capture before sending it to Janus: everything is exactly the same in term of available controls, features, and the like, with the substantial difference that we'll play a bit with what we'll send on the video stream.
More precisely, the demo captures the webcam feed via a
getUserMedia
call, and then will make use of MediaPipe
to segment the video and replace the background by drawing on a
canvas
element. The canvas
element is then used
as the actual source of media for our PeerConnection, which means the
video we get back from the EchoTest plugin should reflect the
tweaks we've made on the stream.
Notice that this is a very naive implementation, which is heavily based on the example from the MediaPipe Selfie Segmentation documentation.
Press the Start
button above to launch the demo.