LMCameraCaptureManager

Objective-C

@interface LMCameraCaptureManager : NSObject <LMCameraCaptureProtocol>

Swift

class LMCameraCaptureManager : NSObject, LMCameraCaptureProtocol

Video stream capture manager.

  • Determines whether orientation change will be processed. By default false.

    Note

    If the property is true, the video stream frame will be expanded according to the device orientation.

    Declaration

    Objective-C

    @property (nonatomic) BOOL orientationEnabled;

    Swift

    var orientationEnabled: Bool { get set }
  • Specifies whether the capture manager should record the video stream

    Declaration

    Objective-C

    @property (nonatomic) BOOL canRecordVideo;

    Swift

    var canRecordVideo: Bool { get set }
  • Defines the duration of the recorded video

    Declaration

    Objective-C

    @property (nonatomic) CGFloat videoRecordLength;

    Swift

    var videoRecordLength: CGFloat { get set }
  • Capture manager delegate

    Declaration

    Objective-C

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

    Swift

    weak var delegate: (any LMCameraCaptureManagerDelegate)? { get set }
  • Holds ouput video file name

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull videoFile;

    Swift

    var videoFile: String { get }
  • Current camer

    Declaration

    Objective-C

    @property (nonatomic, readonly) AVCaptureDevicePosition cameraPosition;

    Swift

    var cameraPosition: AVCaptureDevice.Position { get }
  • Current status of camera authorization

    Declaration

    Objective-C

    + (AVAuthorizationStatus)cameraAuthorizationStatus;

    Swift

    class func cameraAuthorizationStatus() -> AVAuthorizationStatus
  • Requests access to the camera to capture a video stream. If authorization was passed before, request of authorization will be skipped and current status of authorization will be passed ///to callback

    Note

    It is required to add to key NSCameraUsageDescription in Info.plist of project using this framework

    Declaration

    Objective-C

    + (void)requestAccessForVideoWithCompletion:
        (nonnull void (^)(AVAuthorizationStatus))completion;

    Swift

    class func requestAccessForVideo() async -> AVAuthorizationStatus

    Parameters

    completion

    Callback will be called after authorization passing. Passed parameter with status type of authorization