Added
Change Detection Capture Mode
- New capture mode that captures frames only when screen content changes
- Configurable change detection options:
threshold - Percentage of pixels that must change to trigger capture (1-100%)
minInterval - Minimum milliseconds between captures (100-60000ms)
maxInterval - Maximum milliseconds before forced capture (0 = disabled)
sampleRate - Pixel sampling rate for performance optimization (1-100)
detectionRegion - Optional region to monitor for changes
- New
CHANGE_DETECTED event for debugging and monitoring
- Pixel sampling algorithm for efficient frame comparison
Example
await FrameCapture.startCapture({
capture: {
mode: 'change-detection',
changeDetection: {
threshold: 15, // Capture when 15% of screen changes
minInterval: 500, // Poll every 500ms
maxInterval: 5000, // Force capture at least every 5s
},
},
image: { quality: 80, format: 'jpeg' },
});