startPreview abstract method
Future<void>
startPreview({
- VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary,
Starts video preview and specifies the video source.
This method starts the local video preview and specifies the video source to appear in the preview. Local preview enables mirror mode by default. After leaving the channel, local preview remains active. You need to call stopPreview to stop the local preview.
sourceTypeType 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. See Error Codes for details and resolution suggestions.
Implementation
Future<void> startPreview(
{VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary});