Make preview-only mode work

This commit is contained in:
James Babcock committed 2026-08-30 19:17:30 -07:00
1 parent 2d45b65098
commit 602f66f15b
15 files changed
+607 -63

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
declare const com: any;
/**
* The Java object a worker isolate submits surface frames to: the live BLE
* communicator, or the preview-only compositor standing in when no glasses
* are paired (both expose the same submitSurfaceFrame signature). Located
* through Java statics because those are shared across isolates, unlike any
* JS-side state.
*
* Frame submission only. Glasses-hardware calls (e.g. playBuzzerSequence)
* should keep using FaceclawBleCommunicator.getActive() directly, so they
* skip cleanly when nothing is connected.
*/
export function getActiveDisplay(): any {
return (
com.faceclaw.app.FaceclawBleCommunicator.getActive() ??
com.faceclaw.app.FaceclawPreviewCompositor.getActive()
);
}