turnCameraOff method

Future<void> turnCameraOff()

Implementation

Future<void> turnCameraOff() async {
  Log().info("CameraManager - turnCameraOff");
  final stream = currentVideoStream;
  currentVideoStream = null;
  if (stream != null) {
    stream.getVideoTracks().forEach((track) {
      track.stop();
    });
    await stream.dispose();
  }
}