TVICameraCapturer Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | TVIVideoCapturer |
| Declared in | TVICameraCapturer.h |
Overview
TVICameraCapturer allows you to preview and share video captured from the device’s built in camera(s).
source
Obtains the camera that is being shared.
@property (nonatomic, assign, readonly) TVIVideoCaptureSource sourceDeclared In
TVICameraCapturer.h
capturing
Indicates that video capture (including preview) is active.
@property (atomic, assign, readonly, getter=isCapturing) BOOL capturingDiscussion
While interrupted, this property will return NO.
Declared In
TVICameraCapturer.h
delegate
The capturer’s delegate.
@property (nonatomic, weak, nullable) id<TVICameraCapturerDelegate> delegateDeclared In
TVICameraCapturer.h
previewDimensions
The dimensions of the preview feed, in the frame of reference specified by the previewView’s orientation.
@property (nonatomic, assign, readonly) CMVideoDimensions previewDimensionsDiscussion
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
TVICameraCapturer.h
previewView
A view which allows you to preview the camera source.
@property (nonatomic, strong, readonly, nullable) TVICameraPreviewView *previewViewDiscussion
The value is nil at the time when TVICameraCapturer is constructed. However, this property will be set
by the time the cameraCapturerPreviewDidStart delegate method is called.
Declared In
TVICameraCapturer.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
TVICameraCapturer.h
– initWithSource:
Initializes the capturer with a source.
- (nullable instancetype)initWithSource:(TVIVideoCaptureSource)sourceParameters
source |
The |
|---|
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack if video capture source is available,
nil if it is not.
Declared In
TVICameraCapturer.h
– initWithSource:delegate:
- (nullable instancetype)initWithSource:(TVIVideoCaptureSource)source delegate:(nullable id<TVICameraCapturerDelegate>)delegateParameters
source |
The |
|---|---|
delegate |
An object which conforms to |
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack if video capture source is available,
nil if it is not.
Declared In
TVICameraCapturer.h
– selectNextSource
Selects the next available camera source, based upon the ordering of TVIVideoCaptureSource.
- (void)selectNextSourceDeclared In
TVICameraCapturer.h
+ isSourceAvailable:
Checks if a TVIVideoCaptureSource is available on your device.
+ (BOOL)isSourceAvailable:(TVIVideoCaptureSource)sourceParameters
source |
The source to check. |
|---|
Return Value
YES if the source is available, or NO if it is not.
Declared In
TVICameraCapturer.h
+ availableSources
Returns all of the sources which are available on your device.
+ (nonnull NSArray<NSNumber*> *)availableSourcesReturn Value
An NSArray containing zero or more NSNumber objects which wrap TVIVideoCaptureSource.
Discussion
If you are on an iOS simulator you should not expect any sources to be returned.
Declared In
TVICameraCapturer.h