LiveKit Swift Client SDK Documentation

Class Video​Capturer

public class VideoCapturer: NSObject, Loggable, VideoCapturerProtocol  
%161 VideoCapturer VideoCapturer MulticastDelegateProtocol MulticastDelegateProtocol VideoCapturer->MulticastDelegateProtocol Loggable Loggable VideoCapturer->Loggable VideoCapturerProtocol VideoCapturerProtocol VideoCapturer->VideoCapturerProtocol NSObject NSObject VideoCapturer->NSObject MacOSScreenCapturer MacOSScreenCapturer MacOSScreenCapturer->VideoCapturer BufferCapturer BufferCapturer BufferCapturer->VideoCapturer CameraCapturer CameraCapturer CameraCapturer->VideoCapturer InAppScreenCapturer InAppScreenCapturer InAppScreenCapturer->VideoCapturer

Nested Types

VideoCapturer.CapturerState

Subclasses

BufferCapturer

A VideoCapturer that can capture CMSampleBuffers.

CameraCapturer
InAppScreenCapturer
MacOSScreenCapturer

Conforms To

Loggable

Allows to extend with custom log method which automatically captures current type (class name).

MulticastDelegateProtocol
VideoCapturerProtocol
NSObject

Properties

supported​Pixel​Formats

public static let supportedPixelFormats  

Array of supported pixel formats that can be used to capture a frame.

Usually the following formats are supported but it is recommended to confirm at run-time: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_32BGRA, kCVPixelFormatType_32ARGB.

dimensions

public internal(set) var dimensions: Dimensions?  

capture​State

public private(set) var captureState: CapturerState = .stopped

Methods

create​Time​Stamp​Ns()

public static func createTimeStampNs() -> Int64  

start​Capture()

public func startCapture() -> Promise<Bool>  

stop​Capture()

public func stopCapture() -> Promise<Bool>  

restart​Capture()

public func restartCapture() -> Promise<Bool>  

add(delegate:​)

@objc(addDelegate:)
    public func add(delegate: VideoCapturerDelegate)  

remove(delegate:​)

@objc(removeDelegate:)
    public func remove(delegate: VideoCapturerDelegate)  

remove​All​Delegates()

@objc
    public func removeAllDelegates()