startProcessingWithDevice

open suspend fun startProcessingWithDevice(inputStream: MediaStream, background: VirtualBackground, device: WebRtcDevice, onProcessedFrame: (ProcessedFrame) -> Unit? = null): MediaStream?

Start processing with a WebRtcDevice to create output stream. This method creates a virtual video source that can be used with mediasoup to send processed frames to remote participants.

Return

The processed video stream with virtual background applied

Parameters

inputStream

The camera video stream to process

background

The virtual background to apply

device

The WebRtcDevice to create virtual video source

onProcessedFrame

Optional callback for each processed frame (for preview)