Web: trigger camera start on view load
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
|
||||
<div class="text-center my-6">
|
||||
<div
|
||||
v-if="isScanning"
|
||||
v-if="isScanning && !isNativePlatform"
|
||||
class="relative aspect-square overflow-hidden bg-slate-800 w-[90vw] max-w-[40vh] mx-auto"
|
||||
>
|
||||
<!-- Status Message -->
|
||||
@@ -706,6 +706,10 @@ export default class ContactQRScanShow extends Vue {
|
||||
this.isMounted = true;
|
||||
document.addEventListener("pause", this.handleAppPause);
|
||||
document.addEventListener("resume", this.handleAppResume);
|
||||
// Start scanning automatically when view is loaded, but only on web platform
|
||||
if (!this.isNativePlatform) {
|
||||
this.startScanning();
|
||||
}
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user