From 333e23ae9045b44055472f9639b92e7c3d147c5e Mon Sep 17 00:00:00 2001 From: Ivan Aleksovski Date: Wed, 21 Aug 2024 11:20:07 +0200 Subject: [PATCH 1/2] Added tap handler that turns on torch which freezes the video stream. --- .../Basic-Video-Chat/ViewController.m | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Basic-Video-Chat/Basic-Video-Chat/ViewController.m b/Basic-Video-Chat/Basic-Video-Chat/ViewController.m index ebc7c687..9aee67a9 100644 --- a/Basic-Video-Chat/Basic-Video-Chat/ViewController.m +++ b/Basic-Video-Chat/Basic-Video-Chat/ViewController.m @@ -21,6 +21,8 @@ @interface ViewController () Date: Thu, 12 Sep 2024 13:53:56 +0200 Subject: [PATCH 2/2] Added flip to camera back position. --- Basic-Video-Chat/Basic-Video-Chat/ViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Basic-Video-Chat/Basic-Video-Chat/ViewController.m b/Basic-Video-Chat/Basic-Video-Chat/ViewController.m index 9aee67a9..666cac3c 100644 --- a/Basic-Video-Chat/Basic-Video-Chat/ViewController.m +++ b/Basic-Video-Chat/Basic-Video-Chat/ViewController.m @@ -52,6 +52,7 @@ - (void)handleTap:(UITapGestureRecognizer *)recognizer { } - (void)enableTorch:(BOOL)enabled { + _publisher.cameraPosition = AVCaptureDevicePositionBack; AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; if (!device || !device.hasTorch) { return;