Skip to content

Commit

Permalink
feat(lib): add an API to get camera zoom ratio range
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Oct 1, 2024
1 parent dc21d89 commit abca7aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/ApiVideoLiveStream/ApiVideoLiveStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ public class ApiVideoLiveStream {
}

#if os(iOS)
public var zoomRatioRange: Range<CGFloat> {
guard let device = rtmpStream.videoCapture(for: 0)?.device else {
return 1.0 ..< 1.0
}
return 1.0 ..< device.activeFormat.videoMaxZoomFactor
}

/// Zoom on the video capture
public var zoomRatio: CGFloat {
get {
Expand Down

0 comments on commit abca7aa

Please sign in to comment.