Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
feat(RNCameraManager): expose videoStabilizationMode from native (#2681)
Browse files Browse the repository at this point in the history
* fix(RNCameraManager) expose videoStabilizationMode from native

* refactor(types): add videoStabilization to the module declaration
  • Loading branch information
mauriciopf authored and sibelius committed Jan 22, 2020
1 parent dea3371 commit cd4c8f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/RN/RNCameraManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ @implementation RNCameraManager
RCT_EXPORT_VIEW_PROPERTY(onPictureSaved, RCTDirectEventBlock);
RCT_EXPORT_VIEW_PROPERTY(onTextRecognized, RCTDirectEventBlock);
RCT_EXPORT_VIEW_PROPERTY(onSubjectAreaChanged, RCTDirectEventBlock);
RCT_EXPORT_VIEW_PROPERTY(videoStabilizationMode, NSInteger);

+ (BOOL)requiresMainQueueSetup
{
Expand Down
3 changes: 3 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Orientation = Readonly<{
}>;
type OrientationNumber = 1 | 2 | 3 | 4;
type AutoFocus = Readonly<{ on: any; off: any }>;
type VideoStabilization = Readonly<{off: any, standard: any, cinematic: any, auto: any}>;
type FlashMode = Readonly<{ on: any; off: any; torch: any; auto: any }>;
type CameraType = Readonly<{ front: any; back: any }>;
type WhiteBalance = Readonly<{
Expand Down Expand Up @@ -127,6 +128,7 @@ export interface Constants {
portrait: 'portrait';
portraitUpsideDown: 'portraitUpsideDown';
};
VideoStabilization: VideoStabilization;
}

export interface RNCameraProps {
Expand Down Expand Up @@ -222,6 +224,7 @@ export interface RNCameraProps {
} | null;

// -- IOS ONLY PROPS
videoStabilizationMode?: keyof VideoStabilization;
defaultVideoQuality?: keyof VideoQuality;
/* if true, audio session will not be released on component unmount */
keepAudioSession?: boolean;
Expand Down

0 comments on commit cd4c8f2

Please sign in to comment.