Function: createCameraEffectMiddleware()
createCameraEffectMiddleware(
effect,options):TrackMiddleware
Defined in: react-native/createCameraEffectMiddleware.ts:39
A camera-track middleware that applies an effect to the camera track Fishjam publishes. Hand it
to useCamera().setCameraTrackMiddleware; it stays in place across screens until it is
replaced or cleared with null, and currentCameraMiddleware tells whether it is active.
const blur = createCameraEffectMiddleware(createBackgroundBlurEffect(() => ({ segmentation }))); setCameraTrackMiddleware(enabled ? blur : null);
Parameters​
| Parameter | Type |
|---|---|
effect | VideoEffect |
options | CameraEffectMiddlewareOptions |
Returns​
TrackMiddleware