This commit is contained in:
Jose Olarte III
2025-05-26 19:23:41 +08:00
parent 28634839ec
commit 47501ae917
5 changed files with 34 additions and 15 deletions

View File

@@ -726,9 +726,11 @@ export default class ContactQRScanShow extends Vue {
// Apply mirroring after a short delay to ensure video element is ready
setTimeout(() => {
const videoElement = document.querySelector('.qr-scanner video') as HTMLVideoElement;
const videoElement = document.querySelector(
".qr-scanner video",
) as HTMLVideoElement;
if (videoElement) {
videoElement.style.transform = 'scaleX(-1)';
videoElement.style.transform = "scaleX(-1)";
}
}, 1000);
}
@@ -943,7 +945,9 @@ export default class ContactQRScanShow extends Vue {
// Add method to detect desktop browser
private detectDesktopBrowser(): boolean {
const userAgent = navigator.userAgent.toLowerCase();
return !/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
return !/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
userAgent,
);
}
// Update the computed property for camera mirroring