Type Alias FrameProcessorOpts

FrameProcessorOpts: {
    cameraConstraints?: Constraints;
    captureCanvasEl?: HTMLCanvasElement;
    postCaptureDraw?: ((ctx: CanvasRenderingContext2D, width: number, height: number) => void);
    showCanvas?: boolean;
    showPreview?: boolean;
}

Frame procesor options

Type declaration

  • Optional ReadonlycameraConstraints?: Constraints

    Default constraints to use for the camera source

  • Optional ReadonlycaptureCanvasEl?: HTMLCanvasElement

    If specified, this canvas will be used for capturing frames to

  • Optional ReadonlypostCaptureDraw?: ((ctx: CanvasRenderingContext2D, width: number, height: number) => void)

    If specified, this function will be called after ImageData is captured from the intermediate canvs. This allows for drawing on top of the captured image.

      • (ctx, width, height): void
      • Parameters

        • ctx: CanvasRenderingContext2D
        • width: number
        • height: number

        Returns void

  • Optional ReadonlyshowCanvas?: boolean

    If true, capture canvas will be shown. Default: false

  • Optional ReadonlyshowPreview?: boolean

    If true, raw source will be shown. Default: false.