expo-camera
Version:
A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to t
28 lines • 644 B
JavaScript
/*
* Native web camera (Android) has a torch: boolean
*/
export function convertFlashModeJSONToNative(input) {
switch (input) {
case 'torch':
return true;
case 'on':
case 'off':
case 'auto':
default:
return false;
}
}
export function convertAutoFocusJSONToNative(input) {
switch (input) {
case 'on':
case 'auto':
return 'continuous';
case 'off':
return 'manual';
case 'singleShot':
return 'single-shot';
default:
return input;
}
}
//# sourceMappingURL=CapabilityUtils.js.map