Interface: CameraProps
Hierarchy​
-
ViewProps
↳
CameraProps
Properties​
audio​
• Optional
audio: boolean
Enables audio capture for video recordings (see "Recording Videos")
Defined in​
CameraProps.ts:61
device​
• device: CameraDevice
The Camera Device to use.
See the Camera Devices section in the documentation for more information about Camera Devices.
Example
const device = useCameraDevice('back')
if (device == null) return <NoCameraErrorView />
return (
<Camera
device={device}
isActive={true}
style={StyleSheet.absoluteFill}
/>
)
Defined in​
CameraProps.ts:37
enableBufferCompression​
• Optional
enableBufferCompression: boolean
Enables or disables lossless buffer compression for the video stream.
If you only use video
or a frameProcessor
, this
can increase the efficiency and lower memory usage of the Camera.
If buffer compression is enabled, the video pipeline will try to use a lossless-compressed pixel format instead of the normal one.
If you use a frameProcessor
, you might need to change how pixels
are read inside your native frame processor function as this is different
from the usual yuv
or rgb
layout.
If buffer compression is not available but this property is enabled, the normal pixel formats will be used and no error will be thrown.
Platform
iOS
Default
- true // if video={true} and frameProcessor={undefined}
- false // otherwise