stopPreview abstract method

Future<void> stopPreview({
  1. VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary,
})

Stops the local video preview.

After calling startPreview to start the preview, if you want to close the local video preview, call this method. Call this method before joining a channel or after leaving a channel.

  • sourceType The type of the video source. See VideoSourceType.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. < 0: Failure.

Implementation

Future<void> stopPreview(
    {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary});