setVideoEffects static method
- VideoEffectsConfig config
Applies config to the outgoing camera video, before or after join.
VideoEffectsConfig.pipeline picks the engine and can change at any time. On Android the camera reads it only when capture starts, so a change while the camera is on restarts capture in place, on the same camera, with the track and its tiles kept; iOS switches on the next frame:
- VideoEffectsPipeline.LEGACY (default): the SDK's CPU engine. Framing
follows the largest face found by an on-device detector (ML Kit on
Android, Vision on iOS); low-light, style and filter run on the CPU.
Every remote participant, and the local preview, sees the result.
On Android, face framing needs ML Kit in your app: add
implementation "com.google.mlkit:face-detection:16.1.7"to itsbuild.gradle. Without it the other effects still run, and the result'sreasonsays why framing is off. - VideoEffectsPipeline.GRAPH: the SDK's GPU effects. Framing then follows whatever publishFramingSubject publishes, since the GPU pipeline hands no frames to a detector.
Within one pipeline every effect change applies on the next frame with no restart. Returns the same map as getAppliedVideoEffectsConfig. Send the whole config each time.
Implementation
static Future<Map<String, dynamic>?> setVideoEffects(
VideoEffectsConfig config) {
return _channel.invokeMapMethod<String, dynamic>(
'setVideoEffects',
{'config': config.toJson()},
);
}