Merge branch 'Dev2' of https://git.pstw.com.my/catalyx/PSTW_CentralizeSystem into Dev2
This commit is contained in:
commit
fdc3c81574
@ -785,24 +785,53 @@ console.log("🎬 Video.srcObject:", video?.srcObject);
|
||||
// { frameRate: 30 }, Try max FPS
|
||||
// { exposureTime: 100 }, Lower for less motion blur
|
||||
// { focusMode: "continuous" }, Ensure auto-focus
|
||||
// { width: 1280, height: 720 }]}) Max resolution] Max sharpness
|
||||
track.applyConstraints ({
|
||||
advanced: [
|
||||
{ width: 1280, height: 720 }
|
||||
]
|
||||
// { width: 1280, height: 720 }
|
||||
//]
|
||||
// }) Max resolution] Max sharpness
|
||||
|
||||
|
||||
// track.applyConstraints ({
|
||||
// advanced: [
|
||||
// {sharpness: 80},
|
||||
// { width: 1280, height: 720 }
|
||||
// ]
|
||||
// })
|
||||
// .then(() => {console.log("✅ Sharpness applied"); console.log("📷 Applied Constraintsss:", track.getSettings()); })
|
||||
// .catch(err => console.error("❌ Failed to apply sharpness:", err));
|
||||
|
||||
// Step 1: Apply resolution constraints first
|
||||
track.applyConstraints({
|
||||
advanced: [{ width: 1280, height: 720 }]
|
||||
}).then(() => {
|
||||
console.log("✅ Resolution applied", track.getSettings().width, "x", track.getSettings().height);
|
||||
|
||||
// Step 2: Apply sharpness separately
|
||||
return track.applyConstraints({ advanced: [{ sharpness: 100 }] });
|
||||
}).then(() => {console.log("✅ Sharpness applied")
|
||||
|
||||
// Step 2: Apply sharpness separately
|
||||
return track.applyConstraints({ advanced: [{ whiteBalanceMode: "continuous" }] });
|
||||
}).then(() => {console.log("✅ whitebalancemode continous applied");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
.then(() => console.log("✅ Sharpness applied"))
|
||||
.catch(err => console.error("❌ Failed to apply sharpness:", err));
|
||||
.then(() => { console.log("📷 Applied Constraintsss:", track.getSettings());
|
||||
}).catch(err => console.error("❌ Failed to apply constraints:", err));
|
||||
|
||||
} else {
|
||||
console.warn("⚠️ Sharpness not supported on this camera");
|
||||
}
|
||||
}
|
||||
|
||||
console.log("📷 Applied Constraints:", track.getSettings());
|
||||
console.log("📷 Applied Constraintsss:", track.getSettings());
|
||||
console.log("📷 Applied Capabilities:",track.getCapabilities());
|
||||
|
||||
console.log("Is it a video element?", videoElement instanceof HTMLVideoElement);
|
||||
console.log("Camera Ready! Video element:", videoElement);
|
||||
this.videoElement = videoElement; // Store for later use
|
||||
// console.log("Is it a video element?", videoElement instanceof HTMLVideoElement);
|
||||
// console.log("Camera Ready! Video element:", videoElement);
|
||||
// this.videoElement = videoElement; Store for later use
|
||||
// this.scanStartTime = performance.now(); Start timing
|
||||
// this.scanTime = null; Reset previous scan time
|
||||
// if (!videoElement || !videoElement.srcObject) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user