toggleVideo method

Future<void> toggleVideo([
  1. bool? enabled
])

Toggles local video stream on and off.

Implementation

Future<void> toggleVideo([bool? enabled]) async {
  Log.debug('toggleVideo($enabled)', '$runtimeType');

  await setVideoEnabled(
    videoState.value != LocalTrackState.enabled &&
        videoState.value != LocalTrackState.enabling,
  );
}