@mentra/engine 3.2.1-dev.292 → 3.2.1-dev.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/services/AcsMeetingService.d.ts +2 -2
- package/build/services/AcsMeetingService.d.ts.map +1 -1
- package/build/services/AcsMeetingService.js +25 -7
- package/build/services/AcsMeetingService.js.map +1 -1
- package/build/services/LocalMiniappRuntime.js +1 -1
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/ManagedWebRtcRelay.d.ts +2 -0
- package/build/services/ManagedWebRtcRelay.d.ts.map +1 -1
- package/build/services/ManagedWebRtcRelay.js +30 -13
- package/build/services/ManagedWebRtcRelay.js.map +1 -1
- package/build/services/SoftapCallTransport.d.ts +1 -1
- package/build/services/SoftapCallTransport.d.ts.map +1 -1
- package/build/services/SoftapCallTransport.js +2 -2
- package/build/services/SoftapCallTransport.js.map +1 -1
- package/package.json +8 -8
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/services/AcsMeetingService.ts +31 -6
- package/src/services/LocalMiniappRuntime.ts +2 -2
- package/src/services/ManagedWebRtcRelay.ts +29 -13
- package/src/services/SoftapCallTransport.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedWebRtcRelay.d.ts","sourceRoot":"","sources":["../../src/services/ManagedWebRtcRelay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,gCAAgC,CAAA;AAIzF,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAA;IACnC,YAAY,CAAC,EAAE,OAAO,CA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I,GACvB,YAAY,CA+Bd"}
|
|
@@ -14,6 +14,8 @@ export class ManagedWebRtcRelay {
|
|
|
14
14
|
attemptError = null;
|
|
15
15
|
hotspotTouched = false;
|
|
16
16
|
nativeTouched = false;
|
|
17
|
+
preparing = false;
|
|
18
|
+
prepareStop = null;
|
|
17
19
|
glassesTouched = false;
|
|
18
20
|
release = null;
|
|
19
21
|
listener = null;
|
|
@@ -49,6 +51,13 @@ export class ManagedWebRtcRelay {
|
|
|
49
51
|
}
|
|
50
52
|
cancel() {
|
|
51
53
|
this.cancelled = true;
|
|
54
|
+
if (this.preparing && this.attemptId && !this.prepareStop) {
|
|
55
|
+
// Local Network permission can wait indefinitely. Interrupt this owned prepare
|
|
56
|
+
// before the coordinator's transition lock can reach stop(). Native stop rejects
|
|
57
|
+
// prepare and resolves only after its peers and hotspot join have been released.
|
|
58
|
+
this.prepareStop = this.deps.native.stop(this.attemptId);
|
|
59
|
+
void this.prepareStop.catch(() => undefined); // stop() awaits and reports cleanup failure.
|
|
60
|
+
}
|
|
52
61
|
}
|
|
53
62
|
owns(streamId) {
|
|
54
63
|
// Consume late status from all attempts without allowing it to affect the current attempt.
|
|
@@ -84,16 +93,23 @@ export class ManagedWebRtcRelay {
|
|
|
84
93
|
await this.deps.sleep(3_000); // Same beacon/DHCP startup allowance as ACS.
|
|
85
94
|
this.checkpoint();
|
|
86
95
|
this.nativeTouched = true;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
this.preparing = true;
|
|
97
|
+
let url;
|
|
98
|
+
try {
|
|
99
|
+
url = await this.deps.native.prepare({
|
|
100
|
+
attemptId: this.attemptId,
|
|
101
|
+
ingestUrl: this.options.ingestUrl,
|
|
102
|
+
ssid: hotspot.ssid,
|
|
103
|
+
password: hotspot.password,
|
|
104
|
+
gatewayAddress: hotspot.localIp,
|
|
105
|
+
captureAudio,
|
|
106
|
+
audioTransport: lc3 ? "ble-lc3" : captureAudio ? "whip" : "none",
|
|
107
|
+
bitrate: this.options.video?.bitrate ?? 2_000_000,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
this.preparing = false;
|
|
112
|
+
}
|
|
97
113
|
this.checkpoint();
|
|
98
114
|
if (lc3) {
|
|
99
115
|
const id = this.attemptId;
|
|
@@ -197,14 +213,15 @@ export class ManagedWebRtcRelay {
|
|
|
197
213
|
return this.stopping;
|
|
198
214
|
this.listener?.remove();
|
|
199
215
|
this.listener = null;
|
|
200
|
-
this.stopping = this.
|
|
201
|
-
.catch(() => undefined)
|
|
216
|
+
this.stopping = Promise.resolve(this.prepareStop)
|
|
217
|
+
.then(() => this.operation.catch(() => undefined))
|
|
202
218
|
.then(async () => {
|
|
203
219
|
await this.cleanupAttempt();
|
|
204
220
|
this.release?.();
|
|
205
221
|
this.release = null;
|
|
206
222
|
})
|
|
207
223
|
.finally(() => {
|
|
224
|
+
this.prepareStop = null;
|
|
208
225
|
this.stopping = null;
|
|
209
226
|
});
|
|
210
227
|
return this.stopping;
|
|
@@ -238,7 +255,7 @@ export class ManagedWebRtcRelay {
|
|
|
238
255
|
});
|
|
239
256
|
if (this.nativeTouched && id)
|
|
240
257
|
await step(async () => {
|
|
241
|
-
await this.deps.native.stop(id);
|
|
258
|
+
await (this.prepareStop ?? this.deps.native.stop(id));
|
|
242
259
|
this.nativeTouched = false;
|
|
243
260
|
});
|
|
244
261
|
if (this.hotspotTouched)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedWebRtcRelay.js","sourceRoot":"","sources":["../../src/services/ManagedWebRtcRelay.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gCAAgC,CAAA;AAEzD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAA;AAy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O,CAAC;QAC3D,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC;QAC5D,WAAW,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE;QAC5C,SAAS;QACT,YAAY;QACZ,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACxE,OAAO,EAAE,qBAAqB;QAC9B,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,OAAO,YAAY,CAAC,eAAe,KAAK,UAAU;YACjF,CAAC,CAAC;gBACE,UAAU,EAAE;oBACV,OAAO,EAAE,GAAG,EAAE,CACZ,iBAAiB,CAAC,OAAO,CAAC;wBACxB,KAAK,EAAE,wBAAwB,OAAO,CAAC,QAAQ,EAAE;wBACjD,MAAM,EAAE,SAAS;wBACjB,OAAO,EAAE,YAAY;qBACtB,CAAC,CAAC,OAAO;oBACZ,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC;iBACvE;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport type {StreamStartRequest, StreamStatusEvent} from \"@mentra/bluetooth-sdk/internal\"\nimport {acquireGlassesHotspot} from \"./GlassesHotspotLease\"\nimport {pcmToBase64} from \"../utils/pcmToBase64\"\n\nexport interface RelayOptions {\n streamId: string\n ingestUrl: string\n video?: StreamStartRequest[\"video\"]\n audio?: StreamStartRequest[\"audio\"]\n captureAudio?: boolean\n sound?: boolean\n}\n\ninterface NativeRelayEvent {\n attemptId: string\n state: string\n reason: string\n}\ninterface NativeRelay {\n prepare(options: {\n attemptId: string\n ingestUrl: string\n ssid: string\n password: string\n gatewayAddress?: string\n captureAudio: boolean\n audioTransport: \"whip\" | \"ble-lc3\" | \"none\"\n bitrate: number\n }): Promise<string>\n stop(attemptId: string): Promise<void>\n pushOutgoingPcm?(attemptId: string, base64: string, sampleRate: number, channels: number): boolean\n addListener(event: \"onRelayState\", listener: (event: NativeRelayEvent) => void): {remove(): void}\n}\n\nexport interface RelayDependencies {\n native: NativeRelay\n hotspot(enabled: boolean): Promise<{state: string; ssid?: string; password?: string; localIp?: string}>\n startGlasses(request: StreamStartRequest): Promise<StreamStatusEvent | undefined>\n stopGlasses(): Promise<unknown>\n deferredStop(): void\n connected(): boolean\n sleep(ms: number): Promise<void>\n now(): number\n acquire(): () => void\n /** Present only on hosts that can pin and decode the glasses' BLE microphone, as ACS does. */\n microphone?: {\n acquire(): () => void\n subscribe(listener: (event: {pcm?: ArrayBuffer; sampleRate?: number; source?: string}) => void): {remove(): void}\n }\n}\n\nexport interface ManagedRelay {\n start(): Promise<StreamStatusEvent | undefined>\n cancel(): void\n stop(): Promise<void>\n owns(streamId: string): boolean\n handleGlassesStatus(event: StreamStatusEvent): void\n}\n\n/** One attempt at a time; video stays native. All retries unwind both peers, mic and hotspot. */\nexport class ManagedWebRtcRelay implements ManagedRelay {\n private cancelled = false\n private started = false\n private attempt = 0\n private attemptId: string | null = null\n private attemptError: Error | null = null\n private hotspotTouched = false\n private nativeTouched = false\n private glassesTouched = false\n private release: (() => void) | null = null\n private listener: {remove(): void} | null = null\n private operation: Promise<unknown> = Promise.resolve()\n private restarting = false\n private retries = 0\n private readyAt: number | null = null\n private stopping: Promise<void> | null = null\n private releaseMic: (() => void) | null = null\n private micListener: {remove(): void} | null = null\n\n constructor(\n private readonly options: RelayOptions,\n private readonly onStatus: (status: string, reason: string) => void,\n private readonly onFailure: (error: Error) => void,\n private readonly deps: RelayDependencies,\n ) {}\n\n start(): Promise<StreamStatusEvent | undefined> {\n if (this.started) return Promise.reject(new Error(\"Relay already started\"))\n this.started = true\n this.release = this.deps.acquire()\n this.listener = this.deps.native.addListener(\"onRelayState\", (event) => {\n if (event.attemptId !== this.attemptId || this.cancelled) return\n if (event.state === \"failed\") this.failed(new Error(event.reason))\n else this.onStatus(event.state, event.reason)\n })\n const start = this.startAttempt()\n this.operation = start\n return start\n }\n\n cancel(): void {\n this.cancelled = true\n }\n\n owns(streamId: string): boolean {\n // Consume late status from all attempts without allowing it to affect the current attempt.\n return streamId.startsWith(`${this.options.streamId}-relay-`)\n }\n\n handleGlassesStatus(event: StreamStatusEvent): void {\n if (event.streamId !== this.attemptId || this.cancelled) return\n if (event.status === \"stopped\" || event.terminal) {\n this.failed(new Error(\"Glasses publisher stopped\"))\n }\n }\n\n private checkpoint(): void {\n if (this.cancelled) throw new Error(\"Relay cancelled\")\n if (this.attemptError) throw this.attemptError\n }\n\n private async startAttempt(): Promise<StreamStatusEvent | undefined> {\n this.attemptId = `${this.options.streamId}-relay-${++this.attempt}`\n this.attemptError = null\n this.checkpoint()\n const captureAudio = this.options.captureAudio !== false\n const lc3 = captureAudio && !!this.deps.microphone && typeof this.deps.native.pushOutgoingPcm === \"function\"\n // Claim through the same policy/ownership layer as ACS before turning off WHIP audio.\n if (lc3) this.releaseMic = this.deps.microphone!.acquire()\n this.hotspotTouched = true // A timed-out BLE command may still have enabled the AP.\n const hotspot = await this.deps.hotspot(true)\n this.checkpoint()\n if (hotspot.state !== \"enabled\" || !hotspot.ssid || !hotspot.password)\n throw new Error(\"Glasses hotspot did not start\")\n await this.deps.sleep(3_000) // Same beacon/DHCP startup allowance as ACS.\n this.checkpoint()\n this.nativeTouched = true\n const url = await this.deps.native.prepare({\n attemptId: this.attemptId,\n ingestUrl: this.options.ingestUrl,\n ssid: hotspot.ssid,\n password: hotspot.password,\n gatewayAddress: hotspot.localIp,\n captureAudio,\n audioTransport: lc3 ? \"ble-lc3\" : captureAudio ? \"whip\" : \"none\",\n bitrate: this.options.video?.bitrate ?? 2_000_000,\n })\n this.checkpoint()\n if (lc3) {\n const id = this.attemptId\n let received = false\n this.micListener = this.deps.microphone!.subscribe((event) => {\n if (this.cancelled || this.attemptId !== id || this.attemptError) return\n if (event.source !== \"glasses\") {\n this.failed(new Error(\"Managed stream lost the glasses microphone\"))\n return\n }\n if (!event.pcm?.byteLength) return\n try {\n const accepted = this.deps.native.pushOutgoingPcm!(id, pcmToBase64(event.pcm), event.sampleRate ?? 16000, 1)\n if (accepted && !received) {\n received = true\n console.log(\"[ManagedRelay] First BLE LC3 audio frame\", {\n attemptId: id,\n sampleRate: event.sampleRate ?? 16000,\n })\n }\n } catch (error) {\n this.failed(asError(error))\n }\n })\n }\n this.glassesTouched = true\n const result = await this.deps.startGlasses({\n type: \"start_stream\",\n streamId: this.attemptId,\n streamUrl: url,\n ice: {stun: \"\"},\n sound: this.options.sound ?? true,\n captureAudio: captureAudio && !lc3,\n ...(this.options.video !== undefined ? {video: this.options.video} : {}),\n ...(this.options.audio !== undefined ? {audio: this.options.audio} : {}),\n })\n this.checkpoint()\n this.readyAt = this.deps.now()\n return result\n }\n\n private failed(error: Error): void {\n if (this.cancelled || this.attemptError) return\n this.attemptError = error\n // Bound consecutive trouble, not the lifetime number of recoveries in a long stream.\n if (this.readyAt !== null && this.deps.now() - this.readyAt >= 60_000) this.retries = 0\n this.readyAt = null\n if (this.restarting) return\n this.restarting = true\n // Await startup before cleanup: late native/BLE success still belongs to this attempt.\n this.operation = this.operation\n .catch(() => undefined)\n .then(async () => {\n while (!this.cancelled) {\n try {\n await this.cleanupAttempt()\n if (this.cancelled) return\n if (this.retries >= 3) throw error\n this.onStatus(\"reconnecting\", error.message)\n await this.deps.sleep(1_000 * 2 ** this.retries++)\n if (this.cancelled) return\n await this.startAttempt()\n this.onStatus(\"reconnected\", \"Glasses relay restarted\")\n return\n } catch (failure) {\n // Cleanup failure retains ownership; never create another stream on uncertain state.\n if (this.hotspotTouched || this.nativeTouched || this.glassesTouched) {\n try {\n await this.cleanupAttempt()\n } catch (cleanupError) {\n if (!this.cancelled) this.onFailure(asError(cleanupError))\n return\n }\n }\n if (this.retries >= 3) {\n if (!this.cancelled) this.onFailure(asError(failure))\n return\n }\n }\n }\n })\n .finally(() => {\n this.restarting = false\n })\n }\n\n stop(): Promise<void> {\n this.cancel()\n if (this.stopping) return this.stopping\n this.listener?.remove()\n this.listener = null\n this.stopping = this.operation\n .catch(() => undefined)\n .then(async () => {\n await this.cleanupAttempt()\n this.release?.()\n this.release = null\n })\n .finally(() => {\n this.stopping = null\n })\n return this.stopping\n }\n\n private async cleanupAttempt(): Promise<void> {\n const failures: unknown[] = []\n const step = async (action: () => Promise<void>) => {\n try {\n await action()\n } catch (error) {\n failures.push(error)\n }\n }\n // Invalidate callbacks before intentionally stopping the glasses or dropping the network.\n const id = this.attemptId\n this.attemptId = null\n await step(async () => {\n this.micListener?.remove()\n this.micListener = null\n this.releaseMic?.()\n this.releaseMic = null\n })\n if (this.glassesTouched)\n await step(async () => {\n if (this.deps.connected()) await this.deps.stopGlasses()\n else this.deps.deferredStop()\n this.glassesTouched = false\n })\n if (this.nativeTouched && id)\n await step(async () => {\n await this.deps.native.stop(id)\n this.nativeTouched = false\n })\n if (this.hotspotTouched)\n await step(async () => {\n if (this.deps.connected()) {\n const result = await this.deps.hotspot(false)\n if (result.state !== \"disabled\") throw new Error(\"Glasses hotspot shutdown was not confirmed\")\n } else this.deps.deferredStop()\n this.hotspotTouched = false\n })\n if (failures.length) {\n this.attemptId = id // Retain the native attempt token for a subsequent cleanup retry.\n throw new Error(`Relay cleanup failed: ${failures.map((error) => asError(error).message).join(\"; \")}`)\n }\n }\n}\n\nfunction asError(error: unknown): Error {\n return error instanceof Error ? error : new Error(String(error))\n}\n\nexport function createManagedWebRtcRelay(\n options: RelayOptions,\n onStatus: (status: string, reason: string) => void,\n onFailure: (error: Error) => void,\n connected: () => boolean,\n deferredStop: () => void,\n): ManagedRelay {\n // Load only for managed WHIP. Hosts using direct SRT/RTMP need no relay module.\n const {requireNativeModule} = require(\"expo-modules-core\") as typeof import(\"expo-modules-core\")\n const {BgTimer} = require(\"../utils/timers\") as typeof import(\"../utils/timers\")\n const native = requireNativeModule<NativeRelay>(\"MentraGlassesMediaRelay\")\n const {Platform} = require(\"react-native\") as typeof import(\"react-native\")\n const {default: micSessionManager} = require(\"./MicSessionManager\") as typeof import(\"./MicSessionManager\")\n return new ManagedWebRtcRelay(options, onStatus, onFailure, {\n native,\n hotspot: (enabled) => BluetoothSdk.setHotspotState(enabled),\n startGlasses: (request) => BluetoothSdk.startStream(request),\n stopGlasses: () => BluetoothSdk.stopStream(),\n connected,\n deferredStop,\n now: Date.now,\n sleep: (ms) => new Promise((resolve) => BgTimer.setTimeout(resolve, ms)),\n acquire: acquireGlassesHotspot,\n ...(Platform.OS === \"android\" && typeof BluetoothSdk.setMicSourcePin === \"function\"\n ? {\n microphone: {\n acquire: () =>\n micSessionManager.acquire({\n owner: `engine:managed-relay:${options.streamId}`,\n source: \"glasses\",\n useCase: \"livestream\",\n }).release,\n subscribe: (listener) => BluetoothSdk.addListener(\"mic_pcm\", listener),\n },\n }\n : {}),\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ManagedWebRtcRelay.js","sourceRoot":"","sources":["../../src/services/ManagedWebRtcRelay.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gCAAgC,CAAA;AAEzD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAA;AAyDhD,iGAAiG;AACjG,MAAM,OAAO,kBAAkB;IAsBV;IACA;IACA;IACA;IAxBX,SAAS,GAAG,KAAK,CAAA;IACjB,OAAO,GAAG,KAAK,CAAA;IACf,OAAO,GAAG,CAAC,CAAA;IACX,SAAS,GAAkB,IAAI,CAAA;IAC/B,YAAY,GAAiB,IAAI,CAAA;IACjC,cAAc,GAAG,KAAK,CAAA;IACtB,aAAa,GAAG,KAAK,CAAA;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E,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC;iBACvE;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import BluetoothSdk from \"@mentra/bluetooth-sdk/internal\"\nimport type {StreamStartRequest, StreamStatusEvent} from \"@mentra/bluetooth-sdk/internal\"\nimport {acquireGlassesHotspot} from \"./GlassesHotspotLease\"\nimport {pcmToBase64} from \"../utils/pcmToBase64\"\n\nexport interface RelayOptions {\n streamId: string\n ingestUrl: string\n video?: StreamStartRequest[\"video\"]\n audio?: StreamStartRequest[\"audio\"]\n captureAudio?: boolean\n sound?: boolean\n}\n\ninterface NativeRelayEvent {\n attemptId: string\n state: string\n reason: string\n}\ninterface NativeRelay {\n prepare(options: {\n attemptId: string\n ingestUrl: string\n ssid: string\n password: string\n gatewayAddress?: string\n captureAudio: boolean\n audioTransport: \"whip\" | \"ble-lc3\" | \"none\"\n bitrate: number\n }): Promise<string>\n stop(attemptId: string): Promise<void>\n pushOutgoingPcm?(attemptId: string, base64: string, sampleRate: number, channels: number): boolean\n addListener(event: \"onRelayState\", listener: (event: NativeRelayEvent) => void): {remove(): void}\n}\n\nexport interface RelayDependencies {\n native: NativeRelay\n hotspot(enabled: boolean): Promise<{state: string; ssid?: string; password?: string; localIp?: string}>\n startGlasses(request: StreamStartRequest): Promise<StreamStatusEvent | undefined>\n stopGlasses(): Promise<unknown>\n deferredStop(): void\n connected(): boolean\n sleep(ms: number): Promise<void>\n now(): number\n acquire(): () => void\n /** Present only on hosts that can pin and decode the glasses' BLE microphone, as ACS does. */\n microphone?: {\n acquire(): () => void\n subscribe(listener: (event: {pcm?: ArrayBuffer; sampleRate?: number; source?: string}) => void): {remove(): void}\n }\n}\n\nexport interface ManagedRelay {\n start(): Promise<StreamStatusEvent | undefined>\n cancel(): void\n stop(): Promise<void>\n owns(streamId: string): boolean\n handleGlassesStatus(event: StreamStatusEvent): void\n}\n\n/** One attempt at a time; video stays native. All retries unwind both peers, mic and hotspot. */\nexport class ManagedWebRtcRelay implements ManagedRelay {\n private cancelled = false\n private started = false\n private attempt = 0\n private attemptId: string | null = null\n private attemptError: Error | null = null\n private hotspotTouched = false\n private nativeTouched = false\n private preparing = false\n private prepareStop: Promise<void> | null = null\n private glassesTouched = false\n private release: (() => void) | null = null\n private listener: {remove(): void} | null = null\n private operation: Promise<unknown> = Promise.resolve()\n private restarting = false\n private retries = 0\n private readyAt: number | null = null\n private stopping: Promise<void> | null = null\n private releaseMic: (() => void) | null = null\n private micListener: {remove(): void} | null = null\n\n constructor(\n private readonly options: RelayOptions,\n private readonly onStatus: (status: string, reason: string) => void,\n private readonly onFailure: (error: Error) => void,\n private readonly deps: RelayDependencies,\n ) {}\n\n start(): Promise<StreamStatusEvent | undefined> {\n if (this.started) return Promise.reject(new Error(\"Relay already started\"))\n this.started = true\n this.release = this.deps.acquire()\n this.listener = this.deps.native.addListener(\"onRelayState\", (event) => {\n if (event.attemptId !== this.attemptId || this.cancelled) return\n if (event.state === \"failed\") this.failed(new Error(event.reason))\n else this.onStatus(event.state, event.reason)\n })\n const start = this.startAttempt()\n this.operation = start\n return start\n }\n\n cancel(): void {\n this.cancelled = true\n if (this.preparing && this.attemptId && !this.prepareStop) {\n // Local Network permission can wait indefinitely. Interrupt this owned prepare\n // before the coordinator's transition lock can reach stop(). Native stop rejects\n // prepare and resolves only after its peers and hotspot join have been released.\n this.prepareStop = this.deps.native.stop(this.attemptId)\n void this.prepareStop.catch(() => undefined) // stop() awaits and reports cleanup failure.\n }\n }\n\n owns(streamId: string): boolean {\n // Consume late status from all attempts without allowing it to affect the current attempt.\n return streamId.startsWith(`${this.options.streamId}-relay-`)\n }\n\n handleGlassesStatus(event: StreamStatusEvent): void {\n if (event.streamId !== this.attemptId || this.cancelled) return\n if (event.status === \"stopped\" || event.terminal) {\n this.failed(new Error(\"Glasses publisher stopped\"))\n }\n }\n\n private checkpoint(): void {\n if (this.cancelled) throw new Error(\"Relay cancelled\")\n if (this.attemptError) throw this.attemptError\n }\n\n private async startAttempt(): Promise<StreamStatusEvent | undefined> {\n this.attemptId = `${this.options.streamId}-relay-${++this.attempt}`\n this.attemptError = null\n this.checkpoint()\n const captureAudio = this.options.captureAudio !== false\n const lc3 = captureAudio && !!this.deps.microphone && typeof this.deps.native.pushOutgoingPcm === \"function\"\n // Claim through the same policy/ownership layer as ACS before turning off WHIP audio.\n if (lc3) this.releaseMic = this.deps.microphone!.acquire()\n this.hotspotTouched = true // A timed-out BLE command may still have enabled the AP.\n const hotspot = await this.deps.hotspot(true)\n this.checkpoint()\n if (hotspot.state !== \"enabled\" || !hotspot.ssid || !hotspot.password)\n throw new Error(\"Glasses hotspot did not start\")\n await this.deps.sleep(3_000) // Same beacon/DHCP startup allowance as ACS.\n this.checkpoint()\n this.nativeTouched = true\n this.preparing = true\n let url: string\n try {\n url = await this.deps.native.prepare({\n attemptId: this.attemptId,\n ingestUrl: this.options.ingestUrl,\n ssid: hotspot.ssid,\n password: hotspot.password,\n gatewayAddress: hotspot.localIp,\n captureAudio,\n audioTransport: lc3 ? \"ble-lc3\" : captureAudio ? \"whip\" : \"none\",\n bitrate: this.options.video?.bitrate ?? 2_000_000,\n })\n } finally {\n this.preparing = false\n }\n this.checkpoint()\n if (lc3) {\n const id = this.attemptId\n let received = false\n this.micListener = this.deps.microphone!.subscribe((event) => {\n if (this.cancelled || this.attemptId !== id || this.attemptError) return\n if (event.source !== \"glasses\") {\n this.failed(new Error(\"Managed stream lost the glasses microphone\"))\n return\n }\n if (!event.pcm?.byteLength) return\n try {\n const accepted = this.deps.native.pushOutgoingPcm!(id, pcmToBase64(event.pcm), event.sampleRate ?? 16000, 1)\n if (accepted && !received) {\n received = true\n console.log(\"[ManagedRelay] First BLE LC3 audio frame\", {\n attemptId: id,\n sampleRate: event.sampleRate ?? 16000,\n })\n }\n } catch (error) {\n this.failed(asError(error))\n }\n })\n }\n this.glassesTouched = true\n const result = await this.deps.startGlasses({\n type: \"start_stream\",\n streamId: this.attemptId,\n streamUrl: url,\n ice: {stun: \"\"},\n sound: this.options.sound ?? true,\n captureAudio: captureAudio && !lc3,\n ...(this.options.video !== undefined ? {video: this.options.video} : {}),\n ...(this.options.audio !== undefined ? {audio: this.options.audio} : {}),\n })\n this.checkpoint()\n this.readyAt = this.deps.now()\n return result\n }\n\n private failed(error: Error): void {\n if (this.cancelled || this.attemptError) return\n this.attemptError = error\n // Bound consecutive trouble, not the lifetime number of recoveries in a long stream.\n if (this.readyAt !== null && this.deps.now() - this.readyAt >= 60_000) this.retries = 0\n this.readyAt = null\n if (this.restarting) return\n this.restarting = true\n // Await startup before cleanup: late native/BLE success still belongs to this attempt.\n this.operation = this.operation\n .catch(() => undefined)\n .then(async () => {\n while (!this.cancelled) {\n try {\n await this.cleanupAttempt()\n if (this.cancelled) return\n if (this.retries >= 3) throw error\n this.onStatus(\"reconnecting\", error.message)\n await this.deps.sleep(1_000 * 2 ** this.retries++)\n if (this.cancelled) return\n await this.startAttempt()\n this.onStatus(\"reconnected\", \"Glasses relay restarted\")\n return\n } catch (failure) {\n // Cleanup failure retains ownership; never create another stream on uncertain state.\n if (this.hotspotTouched || this.nativeTouched || this.glassesTouched) {\n try {\n await this.cleanupAttempt()\n } catch (cleanupError) {\n if (!this.cancelled) this.onFailure(asError(cleanupError))\n return\n }\n }\n if (this.retries >= 3) {\n if (!this.cancelled) this.onFailure(asError(failure))\n return\n }\n }\n }\n })\n .finally(() => {\n this.restarting = false\n })\n }\n\n stop(): Promise<void> {\n this.cancel()\n if (this.stopping) return this.stopping\n this.listener?.remove()\n this.listener = null\n this.stopping = Promise.resolve(this.prepareStop)\n .then(() => this.operation.catch(() => undefined))\n .then(async () => {\n await this.cleanupAttempt()\n this.release?.()\n this.release = null\n })\n .finally(() => {\n this.prepareStop = null\n this.stopping = null\n })\n return this.stopping\n }\n\n private async cleanupAttempt(): Promise<void> {\n const failures: unknown[] = []\n const step = async (action: () => Promise<void>) => {\n try {\n await action()\n } catch (error) {\n failures.push(error)\n }\n }\n // Invalidate callbacks before intentionally stopping the glasses or dropping the network.\n const id = this.attemptId\n this.attemptId = null\n await step(async () => {\n this.micListener?.remove()\n this.micListener = null\n this.releaseMic?.()\n this.releaseMic = null\n })\n if (this.glassesTouched)\n await step(async () => {\n if (this.deps.connected()) await this.deps.stopGlasses()\n else this.deps.deferredStop()\n this.glassesTouched = false\n })\n if (this.nativeTouched && id)\n await step(async () => {\n await (this.prepareStop ?? this.deps.native.stop(id))\n this.nativeTouched = false\n })\n if (this.hotspotTouched)\n await step(async () => {\n if (this.deps.connected()) {\n const result = await this.deps.hotspot(false)\n if (result.state !== \"disabled\") throw new Error(\"Glasses hotspot shutdown was not confirmed\")\n } else this.deps.deferredStop()\n this.hotspotTouched = false\n })\n if (failures.length) {\n this.attemptId = id // Retain the native attempt token for a subsequent cleanup retry.\n throw new Error(`Relay cleanup failed: ${failures.map((error) => asError(error).message).join(\"; \")}`)\n }\n }\n}\n\nfunction asError(error: unknown): Error {\n return error instanceof Error ? error : new Error(String(error))\n}\n\nexport function createManagedWebRtcRelay(\n options: RelayOptions,\n onStatus: (status: string, reason: string) => void,\n onFailure: (error: Error) => void,\n connected: () => boolean,\n deferredStop: () => void,\n): ManagedRelay {\n // Load only for managed WHIP. Hosts using direct SRT/RTMP need no relay module.\n const {requireNativeModule} = require(\"expo-modules-core\") as typeof import(\"expo-modules-core\")\n const {BgTimer} = require(\"../utils/timers\") as typeof import(\"../utils/timers\")\n const native = requireNativeModule<NativeRelay>(\"MentraGlassesMediaRelay\")\n const {Platform} = require(\"react-native\") as typeof import(\"react-native\")\n const {default: micSessionManager} = require(\"./MicSessionManager\") as typeof import(\"./MicSessionManager\")\n return new ManagedWebRtcRelay(options, onStatus, onFailure, {\n native,\n hotspot: (enabled) => BluetoothSdk.setHotspotState(enabled),\n startGlasses: (request) => BluetoothSdk.startStream(request),\n stopGlasses: () => BluetoothSdk.stopStream(),\n connected,\n deferredStop,\n now: Date.now,\n sleep: (ms) => new Promise((resolve) => BgTimer.setTimeout(resolve, ms)),\n acquire: acquireGlassesHotspot,\n ...(Platform.OS === \"android\" && typeof BluetoothSdk.setMicSourcePin === \"function\"\n ? {\n microphone: {\n acquire: () =>\n micSessionManager.acquire({\n owner: `engine:managed-relay:${options.streamId}`,\n source: \"glasses\",\n useCase: \"livestream\",\n }).release,\n subscribe: (listener) => BluetoothSdk.addListener(\"mic_pcm\", listener),\n },\n }\n : {}),\n })\n}\n"]}
|
|
@@ -457,7 +457,7 @@ export declare function createSoftapCallDeps(args: {
|
|
|
457
457
|
}>;
|
|
458
458
|
/** Whether this phone's Wi-Fi radio is on. Optional: only Android hosts can answer it. */
|
|
459
459
|
isWifiEnabled?: () => Promise<boolean>;
|
|
460
|
-
joinScopedNetwork: (ssid: string, passphrase: string, gateway?: string) => Promise<string | undefined>;
|
|
460
|
+
joinScopedNetwork: (ssid: string, passphrase: string, gateway?: string, report?: SoftapStepReporter) => Promise<string | undefined>;
|
|
461
461
|
leaveScopedNetwork: () => Promise<void>;
|
|
462
462
|
cancelScopedNetworkJoin?: () => Promise<void>;
|
|
463
463
|
joinMeeting: (packageName: string, options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoftapCallTransport.d.ts","sourceRoot":"","sources":["../../src/services/SoftapCallTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,yDAAyD;AACzD,eAAO,MAAM,YAAY,kEAAmE,CAAA;AAE5F,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE7F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAS,CAAA;AAExC,2FAA2F;AAC3F,eAAO,MAAM,eAAe,QAAS,CAAA;AAEr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AA;KAChB,CAAA;IACD,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAChC,GAAG,cAAc,CAmMjB"}
|
|
@@ -977,8 +977,8 @@ export function createSoftapCallDeps(args) {
|
|
|
977
977
|
},
|
|
978
978
|
joinScopedNetwork: async (ssid, passphrase, report) => {
|
|
979
979
|
const joinOnce = (nextSsid, nextPassphrase) => gatewayAddress
|
|
980
|
-
? subsystems.joinScopedNetwork(nextSsid, nextPassphrase, gatewayAddress)
|
|
981
|
-
: subsystems.joinScopedNetwork(nextSsid, nextPassphrase);
|
|
980
|
+
? subsystems.joinScopedNetwork(nextSsid, nextPassphrase, gatewayAddress, report)
|
|
981
|
+
: subsystems.joinScopedNetwork(nextSsid, nextPassphrase, undefined, report);
|
|
982
982
|
let address;
|
|
983
983
|
try {
|
|
984
984
|
address = await joinOnce(ssid, passphrase);
|