We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb4f77e commit 62ab88dCopy full SHA for 62ab88d
1 file changed
src/BootstrapBlazor/Components/Camera/Camera.razor.js
@@ -136,22 +136,18 @@ export function download(id, fileName) {
136
createEl.remove();
137
}
138
139
-export function resize(id, width, height) {
+export async function resize(id, width, height) {
140
const camera = Data.get(id)
141
if (camera === null || camera.video === void 0) {
142
return
143
144
145
const constrains = {
146
- video: {
147
- deviceId: camera.video.deviceId,
148
- width: { ideal: width },
149
- height: { ideal: height }
150
- }
+ facingMode: "environment",
+ width: { ideal: width },
+ height: { ideal: height }
151
152
-
153
- stopDevice(camera)
154
- play(camera, constrains)
+ await camera.video.track.applyConstraints(constrains);
155
156
157
export function dispose(id) {
0 commit comments