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
cameraDevice
for 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
url
url to saved recorded video
size
size of recoreded video
onStateChanged
callback on video recording
state
onFinished
callback on recording finished with
status
anderror
onProgress
callback 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)