onStreamedFrameAvailable method

  1. @override
Stream<CameraImageData> onStreamedFrameAvailable(
  1. int cameraId, {
  2. CameraImageStreamOptions? options,
})

A new streamed frame is available.

Listening to this stream will start streaming, and canceling will stop. Pausing will throw a CameraException, as pausing the stream would cause very high memory usage; to temporarily stop receiving frames, cancel, then listen again later.

Implementation

@override
Stream<CameraImageData> onStreamedFrameAvailable(int cameraId,
    {CameraImageStreamOptions? options}) {
  _frameStreamController = _createStreamController(onListen: _onFrameStreamListen);
  return _frameStreamController!.stream;
}