Qr
This commit is contained in:
parent
f4fc5dc103
commit
00396e4b0f
@ -402,8 +402,11 @@
|
||||
selectedConstraints: {
|
||||
video: {
|
||||
facingMode: 'user', // Kamera belakang
|
||||
width: { ideal: 1920 },
|
||||
height: { ideal: 1080 },
|
||||
focusDistance: { min: 0.05, ideal: 0.12, max: 0.3 },
|
||||
width: { min: 1920, ideal: 1920 },
|
||||
height: { min: 1080, ideal: 1080 },
|
||||
sharpness: 100,
|
||||
framerate: 60,
|
||||
focusMode: "continuous", // Auto-focus
|
||||
}
|
||||
},
|
||||
@ -750,16 +753,15 @@
|
||||
} else {
|
||||
this.error = "No camera detected.";
|
||||
}
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ video: { deviceId: { exact: "aad01180cfed01791141d7d234f1b0ff4330ff42ff1076e33d92328c859107cf" } } });
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
||||
const track = stream.getVideoTracks()[0];
|
||||
const capabilities = track.getCapabilities();
|
||||
|
||||
track.applyConstraints({
|
||||
advanced: [{width
|
||||
})
|
||||
console.log(capabilities);
|
||||
if (capabilities.focusMode) {
|
||||
await track.applyConstraints({ focusMode: "continuous" }); // Auto-focus
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//Update Camera Category
|
||||
updateCamera() {
|
||||
this.selectedConstraints = { deviceId: { exact: this.selectedCameraId } };
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://192.168.11.117:26468",
|
||||
"applicationUrl": "http://localhost:26468",
|
||||
"sslPort": 44356
|
||||
}
|
||||
},
|
||||
@ -13,7 +13,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://192.168.11.117:5124",
|
||||
"applicationUrl": "http://localhost:5124",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
@ -22,7 +22,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://192.168.11.117:7036;http://192.168.11.117:5124",
|
||||
"applicationUrl": "https://localhost:7036;http://localhost:5124",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user