Video
public class Video : Output
extension Video: VideoRecorderDelegate
extension Video: CameraDeviceAudioDelegate
Video output presents provided OffscreenRenderTarget into the video file.
-
Declaration
Swift
public var state: VideoRecordingState { get } -
Apply watermark to recorded video
Declaration
Swift
public var watermark: WatermarkInfo? -
Declaration
Swift
public var mirrorFrontCamera: Bool -
Create video output
Declaration
Swift
public init(cameraDevice: CameraDevice)Parameters
cameraDevicefor audio frames feed
-
Start recording
Declaration
Swift
public func record( url: URL, size: CGSize, onStateChanged: @escaping (VideoRecordingState) -> Void, onFinished: @escaping (Bool, Error?) -> Void, onProgress: @escaping (TimeInterval) -> Void )Parameters
urlurl to saved recorded video
sizesize of recoreded video
onStateChangedcallback on video recording
stateonFinishedcallback on recording finished with
statusanderroronProgresscallback on recording progress with current progress
time -
Pause recording
Declaration
Swift
public func pause() -
Resume recording
Declaration
Swift
public func resume() -
Stop recording
Declaration
Swift
public func stop() -
Declaration
Swift
public func present(renderTarget: OffscreenRenderTarget) -
Declaration
Swift
public func onRecorderStateChanged(_ state: VideoRecordingState) -
Declaration
Swift
public func onRecordingFinished(success: Bool, error: Error?) -
Declaration
Swift
public func onRecordingProgress(duration: TimeInterval) -
Declaration
Swift
public func push(sampleBuffer: CMSampleBuffer)
Video Class Reference