TWCCameraCapturerDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | TWCCameraCapturer.h |
Overview
The camera capturer delegate receives important lifecycle events related to the capturer. By implementing these methods you can override default behaviour, or handle errors that may occur.
– cameraCapturerPreviewDidStart:
The camera capturer has started capturing local preview.
- (void)cameraCapturerPreviewDidStart:(nonnull TWCCameraCapturer *)capturerParameters
capturer |
The capturer which started. |
|---|
Discussion
The camera capturer has started capturing local preview.
Declared In
TWCCameraCapturer.h
– cameraCapturer:didStartWithSource:
The camera capturer has started capturing video in a live conversation.
- (void)cameraCapturer:(nonnull TWCCameraCapturer *)capturer didStartWithSource:(TWCVideoCaptureSource)sourceParameters
capturer |
The capturer which started. |
|---|---|
source |
The source which is now being captured. |
Discussion
The camera capturer has started capturing video in a live conversation.
By default TWCCameraCapturer mirrors (only) TWCVideoViewRenderer views when the source
is TWCVideoCaptureSourceFrontCamera. If you respond to this delegate method then it is your
responsibility to apply mirroring as you see fit.
Note: At the moment, this method is synchronized with capture output and not the renderers.
Declared In
TWCCameraCapturer.h
– cameraCapturerWasInterrupted:
The camera capturer was temporarily interrupted. Respond to this method to override the default behaviour.
- (void)cameraCapturerWasInterrupted:(nonnull TWCCameraCapturer *)capturerParameters
capturer |
The capture which was interrupted. |
|---|
Discussion
The camera capturer was temporarily interrupted. Respond to this method to override the default behaviour.
By default TWCCameraCapturer will pause the video track in response to an interruption.
This is a good opportunity to update your UI, and/or take some sort of action.
Declared In
TWCCameraCapturer.h
– cameraCapturer:didStopRunningWithError:
The camera capturer stopped running with a fatal error.
- (void)cameraCapturer:(nonnull TWCCameraCapturer *)capturer didStopRunningWithError:(nonnull NSError *)errorParameters
capturer |
The capturer which stopped. |
|---|---|
error |
The error which caused the capturer to stop. |
Discussion
The camera capturer stopped running with a fatal error.
Declared In
TWCCameraCapturer.h