From bb574d6a44c2481260c9937db7c17cd20caa9f97 Mon Sep 17 00:00:00 2001 From: ThibaultBee <37510686+ThibaultBee@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:58:31 +0100 Subject: [PATCH] fix(lib): fix zoom ratio and syncQueue call --- Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift b/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift index cbc8b7c..f6b6d12 100644 --- a/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift +++ b/Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift @@ -117,7 +117,7 @@ public class ApiVideoLiveStream { } do { try device.lockForConfiguration() - device.ramp(toVideoZoomFactor: newValue, withRate: 5.0) + device.videoZoomFactor = newValue device.unlockForConfiguration() } catch let error as NSError { print("Error while locking device for zoom ramp: \(error)") @@ -291,12 +291,12 @@ public class ApiVideoLiveStream { print(error) self.delegate?.videoError(error) } - // This lockQueue waits for attachCamera to be completed and sync operation on the same queue - self.rtmpStream.lockQueue.async { - guard let capture = self.rtmpStream.videoCapture(for: 0) else { - return - } + guard let capture = self.rtmpStream.videoCapture(for: 0) else { + return + } + + self.rtmpStream.lockQueue.async { guard let device = capture.device else { return }