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 source
Declared In
TVICameraCapturer.h
capturing
Indicates that video capture (including preview) is active.
@property (atomic, assign, readonly, getter=isCapturing) BOOL capturing
Discussion
While interrupted, this property will return NO
.
Declared In
TVICameraCapturer.h
delegate
The capturer’s delegate.
@property (nonatomic, weak, nullable) id<TVICameraCapturerDelegate> delegate
Declared 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 previewDimensions
Discussion
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 *previewView
Discussion
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 interrupted
Discussion
Returns YES
if the capturer is currently interrupted, and NO
otherwise.
Declared In
TVICameraCapturer.h
– initWithSource:
Initializes the capturer with a source.
- (nonnull instancetype)initWithSource:(TVIVideoCaptureSource)source
Parameters
source |
The |
---|
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack
.
Declared In
TVICameraCapturer.h
– initWithDelegate:source:
- (nonnull instancetype)initWithDelegate:(nullable id<TVICameraCapturerDelegate>)delegate source:(TVIVideoCaptureSource)source
Parameters
delegate |
An object which conforms to |
---|---|
source |
The |
Return Value
A camera capturer which can be used to create a TVILocalVideoTrack
.
Declared In
TVICameraCapturer.h
– selectNextSource
Selects the next available camera source, based upon the ordering of TVIVideoCaptureSource
.
- (void)selectNextSource
Declared In
TVICameraCapturer.h
+ isSourceAvailable:
Checks if a TVIVideoCaptureSource
is available on your device.
+ (BOOL)isSourceAvailable:(TVIVideoCaptureSource)source
Parameters
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*> *)availableSources
Return 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