VirtualVideoSource

Virtual video source for feeding processed frames into WebRTC. Used for virtual backgrounds where ML Kit processed frames need to be sent to remote participants.

Inheritors

AndroidVirtualVideoSource

Properties

Link copied to clipboard
abstract val stream: MediaStream

The MediaStream containing the virtual video track. This stream can be used as virtualStream in PrepopulateUserMedia.

Link copied to clipboard

The video track from this virtual source. This track can be used with WebRtcProducer.replaceTrack().

Functions

Link copied to clipboard
abstract fun onFrame(bitmap: Any, timestampNs: Long, rotation: Int = 0)

Sends a processed frame to this virtual video source. The frame will be encoded and sent to remote participants.

Link copied to clipboard
abstract fun release()

Releases all resources.

Link copied to clipboard
abstract fun start()

Starts the virtual video source.

Link copied to clipboard
abstract fun stop()

Stops the virtual video source.