IVSCamera

Objective-C

@protocol IVSCamera <IVSImageDevice, IVSMultiSourceDevice>

Swift

protocol IVSCamera : IVSImageDevice, IVSMultiSourceDevice

An extension of IVSImageDevice that represents a physical camera accessible by the host device.

  • Assign a delegate to receive updates about the attached camera.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<IVSCameraDelegate> _Nullable delegate;

    Swift

    weak var delegate: (any IVSCameraDelegate)? { get set }
  • The minimum value which can be provided to the setVideoZoomFactor API.

    Declaration

    Objective-C

    @property (readonly) CGFloat minAvailableVideoZoomFactor;

    Swift

    var minAvailableVideoZoomFactor: CGFloat { get }
  • The maximum value which can be provided to the setVideoZoomFactor API.

    Declaration

    Objective-C

    @property (readonly) CGFloat maxAvailableVideoZoomFactor;

    Swift

    var maxAvailableVideoZoomFactor: CGFloat { get }
  • Applies a centered crop for the camera’s image output. A zoomFactor of 2.0 means the resulting camera frames will be zoomed in twice as much as their normal size. Analogous to setting the AVCaptureDevice property of the same name. Can be called rapidly, for example, via a slider or pinch-to-zoom.

    Declaration

    Objective-C

    - (void)setVideoZoomFactor:(CGFloat)zoomFactor;

    Swift

    func setVideoZoomFactor(_ zoomFactor: CGFloat)

    Parameters

    zoomFactor

    The zoom factor to apply to this camera object.