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