TWCCameraCapturer Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | TWCVideoCapturer |
| Declared in | TWCCameraCapturer.h |
Overview
TWCCameraCapturer allows you to preview and share video captured from the device’s built in camera(s).
camera
Sets/obtains the camera that is being shared.
@property (nonatomic, assign) TWCVideoCaptureSource cameraDiscussion
Sets/obtains the camera that is being shared.
One of:
- TWCVideoCaptureSourceFrontCamera
- TWCVideoCaptureSourceBackCamera
Declared In
TWCCameraCapturer.h
capturing
Indicates that video capture (including preview) is active.
@property (atomic, assign, readonly, getter=isCapturing) BOOL capturingDiscussion
Indicates that video capture (including preview) is active.
While interrupted, this property will return NO.
Declared In
TWCCameraCapturer.h
delegate
The capturer’s delegate.
@property (nonatomic, weak, nullable) id<TWCCameraCapturerDelegate> delegateDiscussion
The capturer’s delegate.
Declared In
TWCCameraCapturer.h
previewDimensions
The dimensions of the preview feed, in the frame of reference specified by the view’s orientation.
@property (nonatomic, assign, readonly) CMVideoDimensions previewDimensionsDiscussion
The dimensions of the preview feed, in the frame of reference specified by the view’s orientation.
With default constraints the dimensions would be 640x480 in landscape, and 480x640 in portrait. If capture is not started then 0x0 will be returned.
Declared In
TWCCameraCapturer.h
previewView
A view which allows you to preview the camera source. Available after calling startPreview.
@property (nonatomic, strong, readonly, nullable) TWCCameraPreviewView *previewViewDiscussion
A view which allows you to preview the camera source. Available after calling startPreview.
Declared In
TWCCameraCapturer.h
videoTrack
The capturer’s local video track.
@property (nonatomic, weak, nullable) TWCLocalVideoTrack *videoTrackDiscussion
The capturer’s local video track.
Declared In
TWCCameraCapturer.h
interrupted
Returns YES if the capturer is currently interrupted, and NO otherwise.
@property (nonatomic, assign, readonly, getter=isInterrupted) BOOL interruptedDiscussion
Returns YES if the capturer is currently interrupted, and NO otherwise.
Declared In
TWCCameraCapturer.h
– initWithSource:
Creates the capturer with a source.
- (nonnull instancetype)initWithSource:(TWCVideoCaptureSource)sourceParameters
source |
The |
|---|
Return Value
A camera capturer which can be used to create a TWCLocalVideoTrack.
Discussion
Creates the capturer with a source.
Declared In
TWCCameraCapturer.h
– initWithDelegate:source:
Creates the capturer with a source and delegate.
- (nonnull instancetype)initWithDelegate:(nullable id<TWCCameraCapturerDelegate>)delegate source:(TWCVideoCaptureSource)sourceParameters
delegate |
The delegate which will receive callbacks from the capturer. |
|---|---|
source |
The |
Return Value
A camera capturer which can be used to create a TWCLocalVideoTrack.
Discussion
Creates the capturer with a source and delegate.
Declared In
TWCCameraCapturer.h