text: #import <AVFoundation/AVFoundation.h>
  #import <React/RCTBridge.h>
  #import <React/RCTBridgeModule.h>
  #import <UIKit/UIKit.h>
  
  @class StreamingCamera;
  
  @interface StreamingCamera : UIView <AVCaptureVideoDataOutputSampleBufferDelegate>
  
  @property(nonatomic, strong) dispatch_queue_t sessionQueue;
  @property(nonatomic, strong) AVCaptureSession *session;
  @property(nonatomic, strong) AVCaptureDeviceInput *videoCaptureDeviceInput;
  @property(nonatomic, strong) AVCaptureStillImageOutput *stillImageOutput;
  @property(nonatomic, strong) AVCaptureMovieFileOutput *movieFileOutput;
  @property(nonatomic, strong) AVCaptureMetadataOutput *metadataOutput;
  @property(nonatomic, strong) id runtimeErrorHandlingObserver;
  @property(nonatomic, strong) AVCaptureVideoPreviewLayer *previewLayer;
  @property(nonatomic, strong) NSArray *barCodeTypes;
  
  @property(nonatomic, assign) NSInteger presetCamera;
  @property (assign, nonatomic) NSInteger flashMode;
  @property (assign, nonatomic) CGFloat zoom;
  @property (assign, nonatomic) NSInteger autoFocus;
  @property (assign, nonatomic) float focusDepth;
  @property (assign, nonatomic) NSInteger whiteBalance;
  @property (assign, nonatomic) AVCaptureSessionPreset pictureSize;
  @property (nonatomic, assign) BOOL isReadingBarCodes;
  @property (nonatomic, assign) BOOL isDetectingFaces;
  @property(assign, nonatomic) AVVideoCodecType videoCodecType;
  @property (assign, nonatomic) AVCaptureVideoStabilizationMode videoStabilizationMode;
  
  @property (strong, nonatomic) AVCaptureVideoDataOutput *videoDataOutput;
  
  - (id)initWithBridge:(RCTBridge *)bridge;
  - (void)updateType;
  - (void)updateFlashMode;
  - (void)updateFocusMode;
  - (void)updateFocusDepth;
  - (void)updateZoom;
  - (void)updateWhiteBalance;
  - (void)updatePictureSize;
  - (void)takePicture:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
  - (void)record:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
  - (void)stopRecording;
  - (void)resumePreview;
  - (void)pausePreview;
  - (void)onReady:(NSDictionary *)event;
  - (void)onMountingError:(NSDictionary *)event;
  - (void)onPictureSaved:(NSDictionary *)event;
  - (void)onStreaming:(NSDictionary *)event;
  
  @end
  
  