lib/project/motion-capture.rb
def captureOutput(output, didFinishProcessingPhoto: photo, error: error)
    if error
      error_callback.call(error)
    else
      @capture_callback.call(photo.fileDataRepresentation)
    end
  end
def captureOutput(output, didFinishProcessingPhoto: photo, error: error)
    if error
      error_callback.call(error)
    else
      @capture_callback.call(photo.fileDataRepresentation)
    end
  end
iOS 11+ AVCapturePhotoCaptureDelegate method