Raven Docs

Effects Quickstart

Install, build a pipeline, attach it to a camera — the shortest real path to a filtered call.

Prerequisites: a joined room with a published camera — see RTC → Quickstart or Live Streaming → Quickstart.

1. Install

Not published to npm yet. The commands below are what installation will look like once these packages are released. Until then, install from a local checkout — see Installing from source.

npm install @corvidhq/effects

@corvidhq/rtc already depends on @corvidhq/effects, so camera.attachEffects() is available even without installing it directly — install it yourself only to build filter/preset configs (effects.filters.*, effects.presets.*).

2. Build a pipeline

import { effects } from '@corvidhq/effects';
 
const pipeline = effects.createPipeline();
 
pipeline.add(effects.filters.brightness({ value: 0.2 }));
pipeline.add(effects.filters.saturation({ value: 1.2 }));

Or start from a preset:

pipeline.applyPreset(effects.presets.cinematic);

3. Attach it to the camera

const camera = await room.enableCamera();
await camera.attachEffects(pipeline);
 
// Later, to stop processing and restore the original camera feed:
await camera.detachEffects();

attachEffects() swaps the published track in place — the RTC session never disconnects, reconnects, or renegotiates, and audio is untouched.

What if the browser can't run it?

attachEffects() never throws for a GPU/rendering failure. If this runtime has no WebGL2, no Canvas2D, or no captureStream() support, the pipeline passes the original camera track through unmodified and emits an error event on the pipeline (RAVEN_EFFECT_UNSUPPORTED) — the call keeps working either way. See Performance for how to detect this ahead of time and Troubleshooting for what to check first.