enableLocalVideo method

  1. @override
Future<void> enableLocalVideo(
  1. bool enabled
)

Disables/Re-enables the local video capture.

This method disables or re-enables the local video capturer, and does not affect receiving the remote video stream.

After you call the RtcEngine.enableVideo method, the local video capturer is enabled by default. You can call RtcEngine.enableVideo (false) to disable the local video capturer. If you want to re-enable it, call RtcEngine.enableVideo (true).

After the local video capturer is successfully disabled or re-enabled, the SDK triggers the RtcEngineEventHandler.userEnableLocalVideo callback on the remote client.

Note

Parameter enabled Sets whether to disable/re-enable the local video, including the capturer, renderer, and sender:

  • true: (Default) Re-enable the local video.
  • false: Disable the local video. Once the local video is disabled, the remote users can no longer receive the video stream of this user, while this user can still receive the video streams of other remote users. When you set enabled as false, this method does not require a local camera.

Implementation

@override
Future<void> enableLocalVideo(bool enabled) {
  return _invokeMethod('enableLocalVideo', {'enabled': enabled});
}