docs: Update example
This commit is contained in:
parent
889b37d063
commit
93019c37e6
@ -97,7 +97,7 @@ You need to disable either `photo`, `video`, or the `codeScanner`.
|
||||
|
||||
## Code result
|
||||
|
||||
The Code Scanner will call your `onCodeScanned` callback with all detected codes ([`Code`](/docs/api/interfaces/Code)), including their decoded string value, and their coordinates on the screen relative to the Preview.
|
||||
The Code Scanner will call your [`onCodeScanned`](/docs/api/interfaces/CodeScanner#oncodescanned) callback with all detected codes ([`Code`](/docs/api/interfaces/Code)), including their decoded string value, and their coordinates on the screen relative to the Preview.
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -63,7 +63,7 @@ export interface CameraProps extends ViewProps {
|
||||
/**
|
||||
* Specifies the pixel format for the video pipeline.
|
||||
*
|
||||
* Frames from a [Frame Processor](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors) will be streamed in the pixel format specified here.
|
||||
* Frames from a [Frame Processor](https://react-native-vision-camera.com/docs/guides/frame-processors) will be streamed in the pixel format specified here.
|
||||
*
|
||||
* While `native` and `yuv` are the most efficient formats, some ML models (such as MLKit Barcode detection) require input Frames to be in RGB colorspace, otherwise they just output nonsense.
|
||||
*
|
||||
@ -218,7 +218,7 @@ export interface CameraProps extends ViewProps {
|
||||
/**
|
||||
* A worklet which will be called for every frame the Camera "sees".
|
||||
*
|
||||
* > See [the Frame Processors documentation](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors) for more information
|
||||
* > See [the Frame Processors documentation](https://react-native-vision-camera.com/docs/guides/frame-processors) for more information
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
@ -233,7 +233,20 @@ export interface CameraProps extends ViewProps {
|
||||
*/
|
||||
frameProcessor?: FrameProcessor
|
||||
/**
|
||||
* TODO: Desc
|
||||
* A CodeScanner that can detect QR-Codes or Barcodes using platform-native APIs.
|
||||
*
|
||||
* > See [the Code Scanner documentation](https://react-native-vision-camera.com/docs/guides/code-scanning) for more information
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* const codeScanner = useCodeScanner({
|
||||
* codeTypes: ['qr', 'ean-13'],
|
||||
* onCodeScanned: (codes) => {
|
||||
* console.log(`Scanned ${codes.length} codes!`)
|
||||
* }
|
||||
* })
|
||||
*
|
||||
* return <Camera {...props} codeScanner={codeScanner} />
|
||||
*/
|
||||
codeScanner?: CodeScanner
|
||||
//#endregion
|
||||
|
@ -4,7 +4,7 @@ import { FrameProcessor } from '../CameraProps'
|
||||
|
||||
/**
|
||||
* Create a new Frame Processor function which you can pass to the `<Camera>`.
|
||||
* (See ["Frame Processors"](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors))
|
||||
* (See ["Frame Processors"](https://react-native-vision-camera.com/docs/guides/frame-processors))
|
||||
*
|
||||
* Make sure to add the `'worklet'` directive to the top of the Frame Processor function, otherwise it will not get compiled into a worklet.
|
||||
*
|
||||
@ -31,7 +31,7 @@ export function createFrameProcessor(frameProcessor: FrameProcessor['frameProces
|
||||
|
||||
/**
|
||||
* Returns a memoized Frame Processor function wich you can pass to the `<Camera>`.
|
||||
* (See ["Frame Processors"](https://mrousavy.github.io/react-native-vision-camera/docs/guides/frame-processors))
|
||||
* (See ["Frame Processors"](https://react-native-vision-camera.com/docs/guides/frame-processors))
|
||||
*
|
||||
* Make sure to add the `'worklet'` directive to the top of the Frame Processor function, otherwise it will not get compiled into a worklet.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user