Skip to content

Commit

Permalink
fix(lib): fix zoom ratio and syncQueue call
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Dec 4, 2023
1 parent 4c91a6b commit bb574d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit bb574d6

Please sign in to comment.