CaptureSourceObserver

@objc
public protocol CaptureSourceObserver

CaptureSourceObserver observes events resulting from different types of capture devices. Builders may desire this input to decide when to show certain UI elements, or to notify users of failure.

  • Called when the capture source has started successfully and has started emitting frames.

    Declaration

    Swift

    func captureDidStart()
  • Called when the capture source has stopped when expected. This may occur when switching cameras, for example.

    Declaration

    Swift

    func captureDidStop()
  • Called when the capture source failed permanently

    Declaration

    Swift

    func captureDidFail(error: CaptureSourceError)

    Parameters

    error

    - The reason why the source has stopped.