Expose properties as constants and make case consistent with StatusBarIOS
This commit is contained in:
parent
30a47427e1
commit
5b157fb0e8
|
@ -24,6 +24,24 @@ var Camera = React.createClass({
|
|||
validAttributes: ReactIOSViewAttributes.UIView
|
||||
},
|
||||
|
||||
Aspect: {
|
||||
stretch: NativeModules.CameraManager.Aspect.stretch,
|
||||
fit: NativeModules.CameraManager.Aspect.fit,
|
||||
fill: NativeModules.CameraManager.Aspect.fill
|
||||
},
|
||||
|
||||
Camera: {
|
||||
front: NativeModules.CameraManager.Camera.front,
|
||||
back: NativeModules.CameraManager.Camera.back
|
||||
},
|
||||
|
||||
Orientation: {
|
||||
landscapeLeft: NativeModules.CameraManager.Orientation.landscapeLeft,
|
||||
landscapeRight: NativeModules.CameraManager.Orientation.landscapeRight,
|
||||
portrait: NativeModules.CameraManager.Orientation.portrait,
|
||||
portraitUpsideDown: NativeModules.CameraManager.Orientation.portraitUpsideDown
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
isAuthorized: false,
|
||||
|
|
|
@ -24,20 +24,20 @@ RCT_EXPORT_VIEW_PROPERTY(orientation, NSInteger);
|
|||
- (NSDictionary *)constantsToExport
|
||||
{
|
||||
return @{
|
||||
@"aspects": @{
|
||||
@"Stretch": AVLayerVideoGravityResize,
|
||||
@"Fit": AVLayerVideoGravityResizeAspect,
|
||||
@"Fill": AVLayerVideoGravityResizeAspectFill
|
||||
@"Aspect": @{
|
||||
@"stretch": AVLayerVideoGravityResize,
|
||||
@"fit": AVLayerVideoGravityResizeAspect,
|
||||
@"fill": AVLayerVideoGravityResizeAspectFill
|
||||
},
|
||||
@"cameras": @{
|
||||
@"Front": @(AVCaptureDevicePositionFront),
|
||||
@"Back": @(AVCaptureDevicePositionBack)
|
||||
@"Camera": @{
|
||||
@"front": @(AVCaptureDevicePositionFront),
|
||||
@"back": @(AVCaptureDevicePositionBack)
|
||||
},
|
||||
@"orientations": @{
|
||||
@"LandscapeLeft": @(AVCaptureVideoOrientationLandscapeLeft),
|
||||
@"LandscapeRight": @(AVCaptureVideoOrientationLandscapeRight),
|
||||
@"Portrait": @(AVCaptureVideoOrientationPortrait),
|
||||
@"PortraitUpsideDown": @(AVCaptureVideoOrientationPortraitUpsideDown)
|
||||
@"Orientation": @{
|
||||
@"landscapeLeft": @(AVCaptureVideoOrientationLandscapeLeft),
|
||||
@"landscapeRight": @(AVCaptureVideoOrientationLandscapeRight),
|
||||
@"portrait": @(AVCaptureVideoOrientationPortrait),
|
||||
@"portraitUpsideDown": @(AVCaptureVideoOrientationPortraitUpsideDown)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue