methods/whiteboard_methods/canvas_capture_web library
Web-specific screen annotation capture implementation using JavaScript interop.
This file replicates React's ScreenboardModal approach:
- Create a hidden video element to play the screen share stream
- Create a hidden canvas to combine video + annotations
- Use captureStream() to create a MediaStream of the combined output
This matches the React implementation in ScreenboardModal.tsx's annotatationPreview().
Classes
- ScreenAnnotationCapture
- Combines screen share video with annotation canvas into a single MediaStream.
- WebCanvasCapture
- Legacy class for backward compatibility. Prefer using ScreenAnnotationCapture for the React-style implementation.
Extensions
- CanvasDrawImageExtension on CanvasRenderingContext2D
- Extension to call drawImage with video element using proper JS interop
Functions
-
isWebCanvasCaptureSupported(
) → bool - Check if web canvas capture is supported.