@mentra/acs-meeting 3.2.0-dev.226 → 3.2.0-dev.227

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.
@@ -26,6 +26,8 @@ export type AcsMeetingState = {
26
26
  activeStream?: AcsActiveStream;
27
27
  audioSafety?: AcsAudioSafety;
28
28
  mediaSource?: AcsMediaSourceState;
29
+ /** Native receiver diagnostic, including the reason a local WHIP offer was rejected. */
30
+ mediaSourceReason?: string;
29
31
  /** Local WHIP endpoint, available after a SoftAP join. */
30
32
  ingestUrl?: string;
31
33
  /** Remote roster (Android emits this; iOS does not yet). */
@@ -1 +1 @@
1
- {"version":3,"file":"AcsMeeting.types.d.ts","sourceRoot":"","sources":["../src/AcsMeeting.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,CAAA;AAEnG,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAC1D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;AAC3D;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE3E,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,cAAc,CAAA;AAEhH,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,EAAE,0BAA0B,CAAA;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IA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AI,CAAA;IACzC,aAAa,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAA;CAClD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AcsMeeting.types.js","sourceRoot":"","sources":["../src/AcsMeeting.types.ts"],"names":[],"mappings":"","sourcesContent":["export type MeetingPhase = \"idle\" | \"connecting\" | \"lobby\" | \"connected\" | \"disconnected\" | \"error\"\n\nexport type AcsAudioSource = \"glasses\" | \"phone\"\nexport type AcsActiveStream = \"none\" | \"virtual\" | \"local\"\nexport type AcsAudioSafety = \"safe\" | \"degraded\" | \"unsafe\"\n/**\n * Health of the glasses WHEP subscription feeding the call. `failed` = ICE dropped or\n * the WHEP endpoint went away while the ACS call may still be `connected`. Native\n * rebuilds it on its own with backoff; the host can force one via `restartVideoSource`.\n */\nexport type AcsMediaSourceState = \"idle\" | \"connecting\" | \"live\" | \"failed\"\n\nexport type AcsMeetingParticipantState = \"idle\" | \"connecting\" | \"connected\" | \"lobby\" | \"hold\" | \"disconnected\"\n\nexport type AcsMeetingParticipant = {\n id: string\n displayName: string | null\n state: AcsMeetingParticipantState\n isMuted: boolean\n isSpeaking: boolean\n}\n\nexport type AcsMeetingState = {\n state: MeetingPhase\n muted: boolean\n error?: string\n meetingUrl?: string\n provider?: \"acs-teams\"\n audioSource?: AcsAudioSource\n activeStream?: AcsActiveStream\n audioSafety?: AcsAudioSafety\n mediaSource?: AcsMediaSourceState\n /** Local WHIP endpoint, available after a SoftAP join. */\n ingestUrl?: string\n /** Remote roster (Android emits this; iOS does not yet). */\n participants?: AcsMeetingParticipant[]\n}\n\nexport type AcsOutgoingVideo = {\n width: number\n height: number\n fps: number\n maxBitrateBps: number\n}\n\nexport type AcsMeetingJoinOptions = {\n meetingUrl: string\n token: string\n whepUrl?: string\n videoSource?: {type: \"whep\"; url: string} | {type: \"softap\"; bindAddress: string}\n displayName?: string\n /** \"glasses\" sends WHEP PCM. \"phone\" uses the ACS local mic (handset or BT). */\n audioSource?: AcsAudioSource\n /**\n * Hold outgoing PCM this many ms before ACS. SoftAP+LC3 sets this in the host\n * because BLE audio reaches the phone before SoftAP video.\n */\n audioDelayMs?: number\n /** Dump WHEP PCM to a WAV in cache for P4 verification. */\n dumpPcmWav?: boolean\n /** When omitted, native keeps 1280×720@15 / 2.5 Mbps. */\n video?: AcsOutgoingVideo\n}\n\nexport type AcsIncomingPcmEvent = {\n base64: string\n sampleRate: number\n channels: number\n}\n\nexport type AcsMeetingModuleEvents = {\n onState: (state: AcsMeetingState) => void\n onIncomingPcm: (pcm: AcsIncomingPcmEvent) => void\n}\n"]}
1
+ {"version":3,"file":"AcsMeeting.types.js","sourceRoot":"","sources":["../src/AcsMeeting.types.ts"],"names":[],"mappings":"","sourcesContent":["export type MeetingPhase = \"idle\" | \"connecting\" | \"lobby\" | \"connected\" | \"disconnected\" | \"error\"\n\nexport type AcsAudioSource = \"glasses\" | \"phone\"\nexport type AcsActiveStream = \"none\" | \"virtual\" | \"local\"\nexport type AcsAudioSafety = \"safe\" | \"degraded\" | \"unsafe\"\n/**\n * Health of the glasses WHEP subscription feeding the call. `failed` = ICE dropped or\n * the WHEP endpoint went away while the ACS call may still be `connected`. Native\n * rebuilds it on its own with backoff; the host can force one via `restartVideoSource`.\n */\nexport type AcsMediaSourceState = \"idle\" | \"connecting\" | \"live\" | \"failed\"\n\nexport type AcsMeetingParticipantState = \"idle\" | \"connecting\" | \"connected\" | \"lobby\" | \"hold\" | \"disconnected\"\n\nexport type AcsMeetingParticipant = {\n id: string\n displayName: string | null\n state: AcsMeetingParticipantState\n isMuted: boolean\n isSpeaking: boolean\n}\n\nexport type AcsMeetingState = {\n state: MeetingPhase\n muted: boolean\n error?: string\n meetingUrl?: string\n provider?: \"acs-teams\"\n audioSource?: AcsAudioSource\n activeStream?: AcsActiveStream\n audioSafety?: AcsAudioSafety\n mediaSource?: AcsMediaSourceState\n /** Native receiver diagnostic, including the reason a local WHIP offer was rejected. */\n mediaSourceReason?: string\n /** Local WHIP endpoint, available after a SoftAP join. */\n ingestUrl?: string\n /** Remote roster (Android emits this; iOS does not yet). */\n participants?: AcsMeetingParticipant[]\n}\n\nexport type AcsOutgoingVideo = {\n width: number\n height: number\n fps: number\n maxBitrateBps: number\n}\n\nexport type AcsMeetingJoinOptions = {\n meetingUrl: string\n token: string\n whepUrl?: string\n videoSource?: {type: \"whep\"; url: string} | {type: \"softap\"; bindAddress: string}\n displayName?: string\n /** \"glasses\" sends WHEP PCM. \"phone\" uses the ACS local mic (handset or BT). */\n audioSource?: AcsAudioSource\n /**\n * Hold outgoing PCM this many ms before ACS. SoftAP+LC3 sets this in the host\n * because BLE audio reaches the phone before SoftAP video.\n */\n audioDelayMs?: number\n /** Dump WHEP PCM to a WAV in cache for P4 verification. */\n dumpPcmWav?: boolean\n /** When omitted, native keeps 1280×720@15 / 2.5 Mbps. */\n video?: AcsOutgoingVideo\n}\n\nexport type AcsIncomingPcmEvent = {\n base64: string\n sampleRate: number\n channels: number\n}\n\nexport type AcsMeetingModuleEvents = {\n onState: (state: AcsMeetingState) => void\n onIncomingPcm: (pcm: AcsIncomingPcmEvent) => void\n}\n"]}
@@ -24,6 +24,8 @@ declare class AcsMeetingNativeModule extends NativeModule<AcsMeetingModuleEvents
24
24
  restartVideoSource(): Promise<void>;
25
25
  /** SoftAP: join the glasses hotspot; resolves to the phone's IPv4 on it. */
26
26
  joinScopedNetwork(ssid: string, passphrase: string): Promise<string>;
27
+ /** iOS: verify DHCP against the gateway advertised by the glasses before resolving. */
28
+ joinScopedNetworkWithGateway?(ssid: string, passphrase: string, gateway: string): Promise<string>;
27
29
  beginTrace(traceId: string): Promise<void>;
28
30
  leaveScopedNetwork(): Promise<void>;
29
31
  /** SoftAP: TCP-probe the hotspot gateway over the scoped network. */
@@ -1 +1 @@
1
- {"version":3,"file":"AcsMeetingModule.d.ts","sourceRoot":"","sources":["../src/AcsMeetingModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAsB,MAAM,MAAM,C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AAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IACnC,qEAAqE;IACrE,kBAAkB,IAAI,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IACnE,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC;CACrC;;AAED,wBAA8E"}
@@ -1 +1 @@
1
- {"version":3,"file":"AcsMeetingModule.js","sourceRoot":"","sources":["../src/AcsMeetingModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AA4BtD,eAAe,mBAAmB,CAAyB,kBAAkB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport type {AcsMeetingJoinOptions, AcsMeetingModuleEvents, AcsMeetingState} from \"./AcsMeeting.types\"\n\ndeclare class AcsMeetingNativeModule extends NativeModule<AcsMeetingModuleEvents> {\n join(options: AcsMeetingJoinOptions): Promise<AcsMeetingState>\n /** Sign in to ACS before SoftAP so Teams is not resolved through glasses DNS. */\n prepareAgent(options: {token: string; displayName?: string}): Promise<AcsMeetingState>\n leave(): Promise<void>\n /**\n * Leave, and resolve only once the hang-up, the agent disposal, and the network releases have\n * finished. Use this explicit barrier across platforms; Android `leave()` only queues cleanup.\n */\n leaveAndAwait(options: {timeoutMs: number}): Promise<{completed: boolean}>\n setMuted(muted: boolean): Promise<AcsMeetingState>\n setAudioSource(source: \"glasses\" | \"phone\"): Promise<AcsMeetingState>\n updateVideoSource(whepUrl: string): Promise<void>\n /** Force a WHEP rebuild on the current URL (phone changed networks). */\n restartVideoSource(): Promise<void>\n /** SoftAP: join the glasses hotspot; resolves to the phone's IPv4 on it. */\n joinScopedNetwork(ssid: string, passphrase: string): Promise<string>\n beginTrace(traceId: string): Promise<void>\n leaveScopedNetwork(): Promise<void>\n /** SoftAP: TCP-probe the hotspot gateway over the scoped network. */\n probeScopedGateway(): Promise<{reachable: boolean; detail: string}>\n getState(): Promise<AcsMeetingState>\n}\n\nexport default requireNativeModule<AcsMeetingNativeModule>(\"MentraAcsMeeting\")\n"]}
1
+ {"version":3,"file":"AcsMeetingModule.js","sourceRoot":"","sources":["../src/AcsMeetingModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AA8BtD,eAAe,mBAAmB,CAAyB,kBAAkB,CAAC,CAAA","sourcesContent":["import {NativeModule, requireNativeModule} from \"expo\"\n\nimport type {AcsMeetingJoinOptions, AcsMeetingModuleEvents, AcsMeetingState} from \"./AcsMeeting.types\"\n\ndeclare class AcsMeetingNativeModule extends NativeModule<AcsMeetingModuleEvents> {\n join(options: AcsMeetingJoinOptions): Promise<AcsMeetingState>\n /** Sign in to ACS before SoftAP so Teams is not resolved through glasses DNS. */\n prepareAgent(options: {token: string; displayName?: string}): Promise<AcsMeetingState>\n leave(): Promise<void>\n /**\n * Leave, and resolve only once the hang-up, the agent disposal, and the network releases have\n * finished. Use this explicit barrier across platforms; Android `leave()` only queues cleanup.\n */\n leaveAndAwait(options: {timeoutMs: number}): Promise<{completed: boolean}>\n setMuted(muted: boolean): Promise<AcsMeetingState>\n setAudioSource(source: \"glasses\" | \"phone\"): Promise<AcsMeetingState>\n updateVideoSource(whepUrl: string): Promise<void>\n /** Force a WHEP rebuild on the current URL (phone changed networks). */\n restartVideoSource(): Promise<void>\n /** SoftAP: join the glasses hotspot; resolves to the phone's IPv4 on it. */\n joinScopedNetwork(ssid: string, passphrase: string): Promise<string>\n /** iOS: verify DHCP against the gateway advertised by the glasses before resolving. */\n joinScopedNetworkWithGateway?(ssid: string, passphrase: string, gateway: string): Promise<string>\n beginTrace(traceId: string): Promise<void>\n leaveScopedNetwork(): Promise<void>\n /** SoftAP: TCP-probe the hotspot gateway over the scoped network. */\n probeScopedGateway(): Promise<{reachable: boolean; detail: string}>\n getState(): Promise<AcsMeetingState>\n}\n\nexport default requireNativeModule<AcsMeetingNativeModule>(\"MentraAcsMeeting\")\n"]}
@@ -21,6 +21,18 @@ public class AcsMeetingModule: Module {
21
21
  return session
22
22
  }
23
23
 
24
+ private func joinHotspot(ssid: String, passphrase: String, gateway: String?, promise: Promise) {
25
+ hotspot.onLost = { [weak self] reason in
26
+ self?.sendEvent("onScopedNetworkLost", ["code": "SOFTAP_LOST", "message": reason])
27
+ }
28
+ hotspot.join(ssid: ssid, passphrase: passphrase, gateway: gateway) { result in
29
+ switch result {
30
+ case let .success(address): promise.resolve(address)
31
+ case let .failure(error): promise.reject(error)
32
+ }
33
+ }
34
+ }
35
+
24
36
  public func definition() -> ModuleDefinition {
25
37
  Name("MentraAcsMeeting")
26
38
  Events("onState", "onIncomingPcm", "onScopedNetworkLost")
@@ -57,17 +69,14 @@ public class AcsMeetingModule: Module {
57
69
  }
58
70
 
59
71
  AsyncFunction("joinScopedNetwork") { (ssid: String, passphrase: String, promise: Promise) in
60
- self.hotspot.onLost = { [weak self] reason in
61
- self?.sendEvent("onScopedNetworkLost", ["code": "SOFTAP_LOST", "message": reason])
62
- }
63
- self.hotspot.join(ssid: ssid, passphrase: passphrase) { result in
64
- switch result {
65
- case let .success(address): promise.resolve(address)
66
- case let .failure(error): promise.reject(error)
67
- }
68
- }
72
+ self.joinHotspot(ssid: ssid, passphrase: passphrase, gateway: nil, promise: promise)
69
73
  }
70
74
 
75
+ AsyncFunction("joinScopedNetworkWithGateway") { (ssid: String, passphrase: String, gateway: String, promise: Promise) in
76
+ self.joinHotspot(ssid: ssid, passphrase: passphrase, gateway: gateway, promise: promise)
77
+ }
78
+
79
+
71
80
  AsyncFunction("leaveScopedNetwork") { (promise: Promise) in
72
81
  self.hotspot.leave { promise.resolve(nil) }
73
82
  }
@@ -75,7 +84,6 @@ public class AcsMeetingModule: Module {
75
84
  AsyncFunction("beginTrace") { (traceId: String) in
76
85
  NSLog("SOFTAP_TRACE trace=\(traceId) stage=ios_begin")
77
86
  }
78
-
79
87
  AsyncFunction("probeScopedGateway") { (promise: Promise) in
80
88
  self.hotspot.probeGateway { reachable, detail in
81
89
  promise.resolve(["reachable": reachable, "detail": detail])
@@ -213,6 +221,7 @@ final class AcsMeetingSession {
213
221
  // Health of the glasses WHEP feed, reported alongside the ACS phase so the host
214
222
  // can tell "call is up, glasses video is dead" from a healthy call.
215
223
  private var mediaSource: SourceState = .idle
224
+ private var mediaSourceReason: String?
216
225
  private var mediaRestartAttempts = 0
217
226
  private var mediaRestartTask: DispatchWorkItem?
218
227
  private static let mediaRestartBaseMs = 1000
@@ -254,6 +263,7 @@ final class AcsMeetingSession {
254
263
  }
255
264
  result["capabilities"] = ["hangUpForEveryone": hangUp]
256
265
  if let ingestUrl = media?.ingestUrl { result["ingestUrl"] = ingestUrl }
266
+ if let mediaSourceReason { result["mediaSourceReason"] = mediaSourceReason }
257
267
  if let meetingUrl { result["meetingUrl"] = meetingUrl }
258
268
  if let lastError { result["error"] = lastError }
259
269
  return result
@@ -559,6 +569,7 @@ final class AcsMeetingSession {
559
569
  private func onMediaSourceState(_ state: SourceState, reason: String) {
560
570
  let previous = mediaSource
561
571
  mediaSource = state
572
+ mediaSourceReason = reason
562
573
  if state == .live { mediaRestartAttempts = 0 }
563
574
  if state == .failed { scheduleMediaRestart(reason: reason) }
564
575
  // start() emits idle then connecting back to back; one snapshot per real change.
@@ -787,6 +798,7 @@ final class AcsMeetingSession {
787
798
  media?.onFrame = nil
788
799
  media?.onPcm = nil
789
800
  mediaSource = .idle
801
+ mediaSourceReason = nil
790
802
  if let local = media as? LocalWhipIngestSource {
791
803
  cleanup.enter()
792
804
  local.stop { self.cleanup.leave() }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentra/acs-meeting",
3
- "version": "3.2.0-dev.226",
3
+ "version": "3.2.0-dev.227",
4
4
  "description": "MentraOS native ACS Teams meeting module (WHEP decode → ACS raw media)",
5
5
  "main": "build/index.js",
6
6
  "react-native": "src/index.ts",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@expo/config-plugins": "~55.0.10",
35
- "@mentra/glasses-media": "3.2.0-dev.226"
35
+ "@mentra/glasses-media": "3.2.0-dev.227"
36
36
  },
37
37
  "devDependencies": {
38
38
  "expo-module-scripts": "^55.0.2",
@@ -30,6 +30,8 @@ export type AcsMeetingState = {
30
30
  activeStream?: AcsActiveStream
31
31
  audioSafety?: AcsAudioSafety
32
32
  mediaSource?: AcsMediaSourceState
33
+ /** Native receiver diagnostic, including the reason a local WHIP offer was rejected. */
34
+ mediaSourceReason?: string
33
35
  /** Local WHIP endpoint, available after a SoftAP join. */
34
36
  ingestUrl?: string
35
37
  /** Remote roster (Android emits this; iOS does not yet). */
@@ -19,6 +19,8 @@ declare class AcsMeetingNativeModule extends NativeModule<AcsMeetingModuleEvents
19
19
  restartVideoSource(): Promise<void>
20
20
  /** SoftAP: join the glasses hotspot; resolves to the phone's IPv4 on it. */
21
21
  joinScopedNetwork(ssid: string, passphrase: string): Promise<string>
22
+ /** iOS: verify DHCP against the gateway advertised by the glasses before resolving. */
23
+ joinScopedNetworkWithGateway?(ssid: string, passphrase: string, gateway: string): Promise<string>
22
24
  beginTrace(traceId: string): Promise<void>
23
25
  leaveScopedNetwork(): Promise<void>
24
26
  /** SoftAP: TCP-probe the hotspot gateway over the scoped network. */