WIP: Unified contact QR code display + capture

This commit is contained in:
Jose Olarte III
2025-05-05 20:52:20 +08:00
parent 9b73e05bdb
commit 79707d2811
5 changed files with 447 additions and 51 deletions

View File

@@ -0,0 +1,17 @@
import { EventEmitter } from "events";
export interface QRScannerListener {
onScan: (result: string) => void;
onError: (error: Error) => void;
}
export interface QRScannerService {
checkPermissions(): Promise<boolean>;
requestPermissions(): Promise<boolean>;
isSupported(): Promise<boolean>;
startScan(): Promise<void>;
stopScan(): Promise<void>;
addListener(listener: QRScannerListener): void;
cleanup(): Promise<void>;
onStream(callback: (stream: MediaStream | null) => void): void;
}