Video Processor - React Native
VideoSDK enables you to add custom effects to your video stream before it’s transmitted during video calls. A video processor changes each camera frame before it is sent.
Understanding Video Processing
Video processing refers to manipulating raw video data (frames) captured by your camera. You can create a native processor on Android and iOS to enhance video streams during rooms.
How it Works:
-
Implement the Interface: On Android, create a class that implements the
VideoFrameProcessorinterface fromlive.videosdk.rtc.android.listeners, and implement itsonFrameCaptured()method. On iOS, create a class that conforms toVideoSDKVideoProcessorfromVideoSDKRTC, and implementonFrameReceived(pixelBuffer:). -
Process the Frame: These methods give you each camera frame before it is encoded: an I420
VideoFrameon Android, aCVPixelBufferon iOS. Apply your desired effects or manipulations to it and return the processed frame. -
Register Your Processor: Create an instance of the processor you plan to use and register it under a unique name with
VideoProcessorRegistry:register()fromlive.videosdk.rncoreon Android,VideoProcessorRegistry.shared.register(name:processor:)fromVideoSDKReactNativeon iOS. -
Apply the Processor: After you join the room, apply the processor by its name with
setVideoProcessor()from theuseRoomhook. -
Remove the Processor: Stop applying the processor with
removeVideoProcessor()from theuseRoomhook.
For the full steps, see Video Processor Android Setup and Video Processor iOS Setup.
Got a Question? Ask us on discord

