startLocalPreview method Null safety

Future<void> startLocalPreview(
  1. bool frontCamera,
  2. dynamic viewId
)

Enable the preview image of local video

When the first camera video frame starts to be rendered, you will receive the onFirstVideoFrame(null) callback in TRTCCloudListener.

Parameters:

frontCamera true: front camera; false: rear camera.

viewId viewId generated by TRTCCloudVideoView

Implementation

Future<void> startLocalPreview(
    bool frontCamera, // true: front camera; false: rear camera.
    viewId) {
  return TRTCCloudVideoViewController(viewId).startLocalPreview(frontCamera);
}