capture Whiteboard Stream
open suspend fun captureWhiteboardStream(shapesProvider: () -> List<Any>, useImageBackgroundProvider: () -> Boolean = { false }, width: Int = 1280, height: Int = 720, frameRate: Int = 30): MediaStream?
Captures the whiteboard canvas as a video stream for recording. Similar to HTML Canvas's captureStream(30) API in web browsers.
This renders the whiteboard shapes to a bitmap at the specified frame rate and converts it to a WebRTC video stream.
Return
MediaStream containing the whiteboard video track
Parameters
shapes Provider
Lambda that returns the current list of whiteboard shapes
use Image Background Provider
Lambda that returns whether to use image background (grid)
width
Width of the capture (default 1280)
height
Height of the capture (default 720)
frame Rate
Target frame rate (default 30fps)