Currently, the camera preview takes up the full background. It would be useful to either mount the camera preview into an HTLM tag with set dimensions, or set the width/height of the camera preview itself, allowing to frame it by overlaying UI over it.
Two possible solutions:
id
:export interface StartScanOptions {
formats?: BarcodeFormat[];
lensFacing?: LensFacing;
+ parentID?: string;
}
Which would mount to HTML tag with id provided in parentID
(= camera-parent
):
<div id="camera-parent" style="height: 400px" />
export interface StartScanOptions {
formats?: BarcodeFormat[];
lensFacing?: LensFacing;
+ dimensions?: Dimensions;
}
+ export interface Dimensions {
+ width?: string;
+ height?: string;
+ }
To allow making the preview smaller than full viewport width and height.
No response
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too