@@ -18,6 +18,7 @@ type CameraType = { front: any, back: any };
18
18
type WhiteBalance = { sunny : any , cloudy : any , shadow : any , incandescent : any , fluorescent : any , auto : any } ;
19
19
type BarCodeType = { aztec : any , code128 : any , code39 : any , code39mod43 : any , code93 : any , ean13 : any , ean8 : any , pdf417 : any , qr : any , upce : any , interleaved2of5 : any , itf14 : any , datamatrix : any } ;
20
20
type VideoQuality = { '2160p' : any , '1080p' : any , '720p' : any , '480p' : any , '4:3' : any } ;
21
+ type VideoCodec = { 'H264' : symbol , 'JPEG' : symbol , 'HVEC' : symbol , 'AppleProRes422' : symbol , 'AppleProRes4444' : symbol } ;
21
22
22
23
type FaceDetectionClassifications = { all : any , none : any } ;
23
24
type FaceDetectionLandmarks = { all : any , none : any } ;
@@ -26,6 +27,7 @@ type FaceDetectionMode = { fast: any, accurate: any };
26
27
export interface Constants {
27
28
AutoFocus : AutoFocus ;
28
29
FlashMode : FlashMode ;
30
+ VideoCodec : VideoCodec ;
29
31
Type : CameraType ;
30
32
WhiteBalance : WhiteBalance ;
31
33
VideoQuality : VideoQuality ;
@@ -142,11 +144,16 @@ interface RecordOptions {
142
144
maxDuration ?: number ;
143
145
maxFileSize ?: number ;
144
146
mute ?: boolean ;
147
+
148
+ /** iOS only */
149
+ codec ?: keyof VideoCodec | VideoCodec [ keyof VideoCodec ] ;
145
150
}
146
151
147
152
interface RecordResponse {
148
153
/** Path to the video saved on your app's cache directory. */
149
154
uri : string ;
155
+ /** iOS only */
156
+ codec : VideoCodec [ keyof VideoCodec ] ;
150
157
}
151
158
152
159
export class RNCamera extends Component < RNCameraProps & ViewProperties > {
0 commit comments