Skip to main content

Compositor API

The Compositor is a useful helper that lets you combine multiple video sources (camera, screen share, canvas, videos) into a single stream for AI processing.
Check out the with-compositor demo to see it in action!

Basic Usage

Configuration

Adding Sources

Video Source (Camera, Screen Share)

Image Source

Canvas Source

Video Element Source

Updating Sources

Removing Sources

Picture-in-Picture Example

Create a PiP layout with screen share and camera overlay:

Dynamic Canvas Drawing

Combine live video with dynamic graphics:

Cleanup

Next Steps