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.
– cameraCapturer:didStartWithSource:
The camera capturer has started capturing live video.
- (void)cameraCapturer:(nonnull TWCCameraCapturer *)capturer didStartWithSource:(TWCVideoCaptureSource)source
Parameters
capturer |
The capturer which started. |
---|---|
source |
The source which is now being captured. |
Discussion
The camera capturer has started capturing live video.
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 *)capturer
Parameters
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 *)error
Parameters
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