fix: soporte universal de camara y escaneo QR con jsQR y fallbacks de lente
This commit is contained in:
+18
-4
@@ -260,11 +260,24 @@
|
||||
|
||||
<!-- PASO 1: ESCANEAR CÁMARA O ELEGIR COMPAÑERO DE PRUEBA -->
|
||||
<div id="transferStepScan">
|
||||
<div style="position: relative; border-radius: 12px; overflow: hidden; background: #000; height: 160px; margin-bottom: 12px;">
|
||||
<video id="transferVideo" style="width: 100%; height: 100%; object-fit: cover;" autoplay playsinline muted></video>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
|
||||
<span style="font-size: 0.75rem; color: #64748b; font-weight: 700;" id="transferCameraStatus">Iniciando cámara...</span>
|
||||
<div style="display: flex; gap: 6px;">
|
||||
<button id="btnFlipTransferCamera" type="button" onclick="flipTransferCamera()" style="display:none; padding: 3px 8px; background: #334155; color: white; border: none; border-radius: 6px; font-size: 0.72rem; font-weight: 700; cursor: pointer;">🔄 Girar</button>
|
||||
<button id="btnRetryTransferCamera" type="button" onclick="startTransferCamera(true)" style="display:none; padding: 3px 8px; background: #0284c7; color: white; border: none; border-radius: 6px; font-size: 0.72rem; font-weight: 700; cursor: pointer;">📷 Activar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: relative; border-radius: 12px; overflow: hidden; background: #000; min-height: 160px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center;">
|
||||
<video id="transferVideo" style="width: 100%; height: 160px; object-fit: cover;" autoplay playsinline muted></video>
|
||||
<div class="laser-scan-line"></div>
|
||||
<div style="position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: white; font-size: 0.72rem; text-shadow: 0 1px 3px black;">
|
||||
Apunta al QR del carné o celular de tu amigo
|
||||
|
||||
<div id="transferCameraHelp" style="display: none; position: absolute; inset: 0; background: rgba(15, 23, 42, 0.9); padding: 14px; text-align: center; flex-direction: column; justify-content: center; align-items: center; gap: 8px; z-index: 10;">
|
||||
<span style="font-size: 1.8rem;">📷</span>
|
||||
<p id="transferCameraHelpText" style="font-size: 0.76rem; color: #f8fafc; line-height: 1.3;">Toca el botón para permitir la cámara</p>
|
||||
<button type="button" onclick="startTransferCamera(true)" style="padding: 6px 14px; background: #0284c7; color: white; border: none; border-radius: 8px; font-weight: 800; font-size: 0.8rem; cursor: pointer;">
|
||||
Permitir Cámara
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -326,6 +339,7 @@
|
||||
</div>
|
||||
|
||||
<script src="/js/sounds.js"></script>
|
||||
<script src="/js/jsQR.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user