stopCapture method

void stopCapture()

Stop capturing and clean up resources.

Implementation

void stopCapture() {
  _isCapturing = false;
  _drawTimer?.cancel();
  _drawTimer = null;

  if (_processedStream != null) {
    for (final track in _processedStream!.getTracks()) {
      track.stop();
    }
    _processedStream = null;
  }

  debugPrint('ScreenAnnotationCapture: Stopped capture');
}