Recorder

public class Recorder

Sample video recorder implementation.

  • The AVWriterOutput for CameraKt.

    Declaration

    Swift

    public let output: AVWriterOutput
  • Flip captured video horizontally.

    Attention

    If your camera pipeline uses AVFoundation, you do not need to set this property.

    Note

    By default this is FALSE. When set to FALSE, the capture will be mirrored on the front and not mirrored on the back camera.

    Note

    If set to TRUE, the capture will be mirrored on top of any mirroring done by AVFoundation: Capture is mirrored if either horizontallyMirrored is TRUE or device set to front camera is TRUE. If both are TRUE the two mirroring operations will cancel out.

    Declaration

    Swift

    public var horizontallyMirror: Bool
  • Designated init to pass in required deps

    Throws

    Throws error if cannot create asset writer with output file URL and file type

    Declaration

    Swift

    public init(url: URL, orientation: AVCaptureVideoOrientation, size: CGSize) throws

    Parameters

    url

    output URL of video file

    orientation

    current orientation of device

    size

    height of video output

    mirrored

    flip video capture horizontally. If false, Recorder will automatically mirror capture based on AVFoundation camera configuration. If true, Recorder will flip the capture. Set this parameter to true when manually mirroring the input with LensProcessor.setInputHorizontallyMirrored.

  • Undocumented

    Declaration

    Swift

    public func startRecording()
  • Undocumented

    Declaration

    Swift

    public func finishRecording(completion: ((URL?, Error?) -> Void)?)
  • Undocumented

    Declaration

    Swift

    public static func affineTransform(orientation: AVCaptureVideoOrientation, mirrored: Bool)
        -> CGAffineTransform