Add support for buzzer sound effects on iOS

This commit is contained in:
James Babcock committed 2026-09-19 12:03:57 -07:00
1 parent 1412db8e82
commit e50da605e0
19 files changed
+211 -48

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import type { WorkerAppReply } from "../ui/shell/worker-window";
declare const com: any;
/** Workers use the main-thread BLE session on iOS and the native queue on Android. */
export function playWorkerBuzzerSequence(payload: Uint8Array): void {
if (global.isIOS) {
global.postMessage({ type: "buzzer-sequence", payload: Array.from(payload) } satisfies WorkerAppReply);
} else {
com.faceclaw.app.FaceclawBleCommunicator.getActive()?.playBuzzerSequence(new Uint8Array(payload).buffer);
}
}