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) TVICameraCaptureSource 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
previewView
A view which allows you to preview the camera source.
@property (nonatomic, strong, readonly, nonnull) TVICameraPreviewView *previewViewDiscussion
previewView will be nil unless the TVICameraCapturer is initialized with the
initWithSource:delegate:enablePreview: initializer, passing YES as the enablePreview argument.
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
– init
Initializes the capturer with TVICameraCaptureSourceFrontCamera.
- (null_unspecified instancetype)initReturn Value
A camera capturer which can be used to create a TVILocalVideoTrack if TVICameraCaptureSourceFrontCamera
is available, otherwise nil.
Declared In
TVICameraCapturer.h
– initWithSource:
Initializes the capturer with a source.
- (nullable instancetype)initWithSource:(TVICameraCaptureSource)sourceParameters
source |
The |
|---|
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack if the video capture source is available,
otherwise nil.
Declared In
TVICameraCapturer.h
– initWithSource:delegate:
Creates the capturer with a source and delegate.
- (nullable instancetype)initWithSource:(TVICameraCaptureSource)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 the video capture source is available,
otherwise nil.
Declared In
TVICameraCapturer.h
– initWithSource:delegate:enablePreview:
Creates the capturer with a source, delegate and whether the preview feed should be generated.
- (nullable instancetype)initWithSource:(TVICameraCaptureSource)source delegate:(nullable id<TVICameraCapturerDelegate>)delegate enablePreview:(BOOL)enablePreviewParameters
source |
The |
|---|---|
delegate |
An object which conforms to |
enablePreview |
Whether the capturer should provide the preview feed via the |
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack if the video capture source is available,
otherwise nil.
Declared In
TVICameraCapturer.h
– selectSource:
Selects a new camera source.
- (BOOL)selectSource:(TVICameraCaptureSource)sourceParameters
source |
The camera source to select. |
|---|
Return Value
YES if the source is available, otherwise NO.
Declared In
TVICameraCapturer.h
+ isSourceAvailable:
Checks if a TVICameraCaptureSource is available on your device.
+ (BOOL)isSourceAvailable:(TVICameraCaptureSource)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 TVICameraCaptureSource.
Discussion
If you are on an iOS simulator you should not expect any sources to be returned.
Declared In
TVICameraCapturer.h