New demo to use canvas element with EchoTest plugin #2261
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.
Nothing fancy: just a new demo, again based on the EchoTest, to show how you can use a canvas element to manipulate the webcam video before you send it to Janus via WebRTC. Very basic, and probably not very efficient, but it should be enough for demo purposes. It looks like this:
This is actually the same code I used in an old Kamailio World Dangerous Demo, that I documented more throroughly in a dedicated blog post; that old demo used the canvas element to change the video we injected in a VideoRoom, and from there an RTP forwarder would feed an FFmpeg script to transcode it to RTMP and send it to YouTube. To keep it simple, I chose to just send it to the EchoTest and have it be bounced back instead, so that people could see the canvas editing in action in real-time.
Planning to merge soon as there's nothing new or groundbreaking here, hope you'll have fin with it!