forked from Blendman974/faceclaw
Add support for buzzer sound effects on iOS
This commit is contained in:
1 parent
1412db8e82
commit
e50da605e0
19 files changed
+211
-48
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user