feat(RNCameraManager): expose videoStabilizationMode from native (#2681)

* fix(RNCameraManager) expose videoStabilizationMode from native

* refactor(types): add videoStabilization to the module declaration
This commit is contained in:
mauriciopf 2020-01-22 12:42:20 -05:00 committed by Sibelius Seraphini
parent dea33716aa
commit cd4c8f24e3
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ RCT_EXPORT_VIEW_PROPERTY(onPictureTaken, RCTDirectEventBlock);
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
{

3
types/index.d.ts vendored
View File

@ -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<{
@ -127,6 +128,7 @@ export interface Constants {
portrait: 'portrait';
portraitUpsideDown: 'portraitUpsideDown';
};
VideoStabilization: VideoStabilization;
}
export interface RNCameraProps {
@ -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;