카메라: 1920×1080 요청(미지원이면 브라우저가 낮춤) + 패널에 카메라 최대 해상도 표시 — 초점 조절 미지원 웹캠은 멀리 두고 잘라 보므로 화소가 많을수록 유리

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Opus 5.5 committed 2026-10-22 21:59:12 +09:00
1 parent dd834f64c0
commit 8664834000
1 file changed
+2 -1
+2 -1
View File
@@ -36,7 +36,7 @@
var video = $('camera-video');
try {
stream = await navigator.mediaDevices.getUserMedia({
video: { facingMode: { ideal: facing }, width: { ideal: 1280 }, height: { ideal: 720 } },
video: { facingMode: { ideal: facing }, width: { ideal: 1920 }, height: { ideal: 1080 } }, // 고정초점 웹캠은 멀리 두고 잘라 보므로 화소가 많을수록 유리(미지원이면 브라우저가 낮춰 줌)
audio: false
});
} catch (e) {
@@ -63,6 +63,7 @@
box.id = 'camera-focus';
box.style.cssText = 'display:flex;align-items:center;gap:6px;font-size:12px;flex-wrap:wrap';
var res = (set.width && set.height) ? set.width + '×' + set.height : '';
if (caps.width && caps.height && caps.width.max > set.width) res += ' (최대 ' + caps.width.max + '×' + caps.height.max + ')';
var fd = caps.focusDistance;
if (!fd || !(fd.max > fd.min)) {
box.textContent = '초점 조절 미지원' + (res ? ' · ' + res : '');