startPreview abstract method

Future<void> startPreview({
  1. required String imgset,
  2. required String streamKey,
  3. IvsQuality quality = IvsQuality.q720,
  4. CameraType cameraType = CameraType.BACK,
  5. void onData(
    1. dynamic
    )?,
  6. void onError(
    1. dynamic
    )?,
})

Starts the camera preview for the broadcast with the specified settings.

  • imgset: The image set identifier for the broadcast.
  • streamKey: The stream key for the broadcast.
  • quality: The desired broadcast quality, default is IvsQuality.q720.
  • cameraType: The camera to use for the preview, default is CameraType.BACK.
  • onData: A callback function to handle real-time data from the event stream.
  • onError: A callback function to handle errors from the event stream.

Returns a Future that completes when the preview has started.

Implementation

Future<void> startPreview({
  required String imgset,
  required String streamKey,
  IvsQuality quality = IvsQuality.q720,
  CameraType cameraType = CameraType.BACK,
  void Function(dynamic)? onData,
  void Function(dynamic)? onError,
});