start method
Future<void>
start({
- required CameraFacing cameraFacing,
- List<
BarcodeFormat> ? formats, - Duration? detectionTimeout,
override
Starts streaming video
Implementation
@override
Future<void> start({
required CameraFacing cameraFacing,
List<BarcodeFormat>? formats,
Duration? detectionTimeout,
}) async {
videoContainer.children = [video];
if (detectionTimeout != null) {
frameInterval = detectionTimeout;
}
final stream = await initMediaStream(cameraFacing);
prepareVideoElement(video);
if (stream != null) {
await attachStreamToVideo(stream, video);
}
}