Device-to-device transfer
document.getElementById('scanner-video').srcObject = cameraStream; scanQR(); } catch(e) { - // Camera not available — hide scanner - document.getElementById('scanner-wrap').style.display = 'none'; + // Camera unavailable — replace the black box with an empty-state + // that explains why and points to the manual-link fallback below. + var reason = 'No camera available on this device.'; + if (e && e.name === 'NotAllowedError') reason = 'Camera permission was blocked. Allow camera access in your browser to scan QR codes.'; + else if (e && e.name === 'NotFoundError') reason = 'No camera detected on this device.'; + else if (window.isSecureContext === false) reason = 'Camera requires a secure (HTTPS) connection.'; + var wrap = document.getElementById('scanner-wrap'); + if (wrap) { + wrap.style.background = 'transparent'; + wrap.style.aspectRatio = 'auto'; + wrap.innerHTML = ''
+ + ''
+ + '
';
+ }
}
}
diff --git a/frontend/get.html b/frontend/get.html
index 1d5d462..c080ad1 100644
--- a/frontend/get.html
+++ b/frontend/get.html
@@ -303,7 +303,8 @@ Camera unavailable
' + + '' + reason + ' You can paste the link manually below instead.
' + + 'Secure file incoming
Preparing...
-
+
+
Starting...