-
-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add zoom slider if supported by the device in Html5QrcodeScanner #330
Comments
UX Help wanted |
A better fix for this would be: If zoom is supported
But this would need longer term effort! |
@mebjas |
#331 will help expose the following two capabilities to /**
* Returns the capabilities of the running video track.
*
* Note: Should only be called if {@code Html5QrcodeScanner#getState()}
* returns {@code Html5QrcodeScannerState#SCANNING} or
* {@code Html5QrcodeScannerState#PAUSED}.
*
* @beta This is an experimental API
* @returns the capabilities of a running video track.
* @throws error if the scanning is not in running state.
*/
public getRunningTrackCapabilities(): MediaTrackCapabilities;
/**
* Apply a video constraints on running video track from camera.
*
* Note: Should only be called if {@code Html5QrcodeScanner#getState()}
* returns {@code Html5QrcodeScannerState#SCANNING} or
* {@code Html5QrcodeScannerState#PAUSED}.
*
* @beta This is an experimental API
* @param {MediaTrackConstraints} specifies a variety of video or camera
* controls as defined in
* https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints
* @returns a Promise which succeeds if the passed constraints are applied,
* fails otherwise.
* @throws error if the scanning is not in running state.
*/
public applyVideoConstraints(videoConstaints: MediaTrackConstraints) Which shall enable the users to build zoom features with a zoom slider UI. It would take me some time to identify a good UI to crunch in zoom slider within current UI. It will probably need some UI rewamp as well. |
I saw this before, bunch of it is useful but not very well supported across browsers. Particularly |
@mebjas |
If you plan to integrate the pan/zoom functionality, these would be best controlled with finger gestures drag/pinch-zoom on a phone or click-drag/mouswheel-zoom on desktop without the need of an UI. If the developer really wants it, a slider could be exposed, but I think it should be hidden by default. No need to litter the UI :) |
about zoom control, i tested this and works perfectly: #308 (comment) |
Feature support coming for Slider implemented, looking into pinch to zoom next. |
Zoom feature published:
|
For
Html5QrcodeScanner
- add zoom slider if capability is supported.For
Html5Qrcode
Html5Qrcode
The text was updated successfully, but these errors were encountered: