startVideoCapturing method

  1. @override
Future<void> startVideoCapturing(
  1. VideoCaptureOptions options
)

Starts a video recording and/or streaming session.

Please see VideoCaptureOptions for documentation on the configuration options.

Implementation

@override
Future<void> startVideoCapturing(VideoCaptureOptions options) async {
  // Max video duration is currently not supported.
  await _hostApi.startVideoRecording(options.streamCallback != null);

  if (options.streamCallback != null) {
    _frameStreamController = _createStreamController();
    _frameStreamController!.stream.listen(options.streamCallback);
    _startStreamListener();
  }
}