@mentra/bluetooth-sdk 0.1.13 → 0.1.14

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.
Files changed (53) hide show
  1. package/README.md +15 -3
  2. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +27 -40
  3. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +7 -13
  4. package/android/src/main/java/com/mentra/bluetoothsdk/DeviceStore.kt +0 -4
  5. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +19 -20
  6. package/android/src/main/java/com/mentra/bluetoothsdk/camera/CameraModels.kt +3 -5
  7. package/android/src/main/java/com/mentra/bluetoothsdk/controllers/ControllerManager.kt +1 -2
  8. package/android/src/main/java/com/mentra/bluetoothsdk/controllers/R1.kt +1 -2
  9. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G1.kt +1 -5
  10. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/G2.kt +0 -5
  11. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Mach1.kt +1 -5
  12. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +1 -39
  13. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraNex.kt +1 -2
  14. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +2 -4
  15. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/Simulated.kt +3 -7
  16. package/android/src/main/java/com/mentra/bluetoothsdk/status/DeviceStatus.kt +0 -6
  17. package/android/src/main/java/com/mentra/bluetoothsdk/streaming/StreamModels.kt +16 -33
  18. package/build/BluetoothSdk.types.d.ts +12 -11
  19. package/build/BluetoothSdk.types.d.ts.map +1 -1
  20. package/build/BluetoothSdk.types.js.map +1 -1
  21. package/build/_private/BluetoothSdkModule.d.ts +4 -6
  22. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  23. package/build/_private/BluetoothSdkModule.js +0 -4
  24. package/build/_private/BluetoothSdkModule.js.map +1 -1
  25. package/build/_private/photoRequestPayload.d.ts.map +1 -1
  26. package/build/_private/photoRequestPayload.js +3 -1
  27. package/build/_private/photoRequestPayload.js.map +1 -1
  28. package/build/index.d.ts +1 -1
  29. package/build/index.d.ts.map +1 -1
  30. package/build/index.js +3 -12
  31. package/build/index.js.map +1 -1
  32. package/ios/BluetoothSdkModule.swift +11 -16
  33. package/ios/Source/DeviceManager.swift +5 -11
  34. package/ios/Source/DeviceStore.swift +0 -4
  35. package/ios/Source/MentraBluetoothSDK.swift +24 -28
  36. package/ios/Source/camera/CameraModels.swift +7 -11
  37. package/ios/Source/controllers/ControllerManager.swift +1 -2
  38. package/ios/Source/controllers/R1.swift +1 -2
  39. package/ios/Source/sgcs/Frame.swift +0 -2
  40. package/ios/Source/sgcs/G1.swift +1 -3
  41. package/ios/Source/sgcs/G2.swift +1 -2
  42. package/ios/Source/sgcs/Mach1.swift +1 -3
  43. package/ios/Source/sgcs/MentraLive.swift +12 -39
  44. package/ios/Source/sgcs/MentraNex.swift +1 -3
  45. package/ios/Source/sgcs/SGCManager.swift +4 -5
  46. package/ios/Source/sgcs/Simulated.swift +2 -6
  47. package/ios/Source/status/DeviceStatus.swift +0 -8
  48. package/ios/Source/streaming/StreamModels.swift +7 -32
  49. package/package.json +1 -1
  50. package/src/BluetoothSdk.types.ts +12 -11
  51. package/src/_private/BluetoothSdkModule.ts +4 -11
  52. package/src/_private/photoRequestPayload.ts +3 -1
  53. package/src/index.ts +7 -15
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ import type {
3
3
  BluetoothSdkEventListener,
4
4
  BluetoothSdkEventName,
5
5
  BluetoothSdkPublicModule,
6
- ButtonPhotoSettings,
6
+ VideoRecordingDefaults,
7
7
  } from "./BluetoothSdk.types"
8
8
 
9
9
  const PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([
@@ -85,19 +85,10 @@ export const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({
85
85
  setGalleryModeEnabled: PrivateBluetoothSdkModule.setGalleryModeEnabled.bind(PrivateBluetoothSdkModule),
86
86
  setVoiceActivityDetectionEnabled:
87
87
  PrivateBluetoothSdkModule.setVoiceActivityDetectionEnabled.bind(PrivateBluetoothSdkModule),
88
- setButtonPhotoSettings: (settings: ButtonPhotoSettings) => {
89
- // setButtonPhotoCaptureSettings is available in SDK 0.1.13+. Guard for OTA version-skew
90
- // where a new JS bundle runs against an older native module that only has the string form.
91
- if (typeof PrivateBluetoothSdkModule.setButtonPhotoCaptureSettings === "function") {
92
- return PrivateBluetoothSdkModule.setButtonPhotoCaptureSettings(settings)
93
- }
94
- // Legacy fallback: old native bridge only accepts a size string
95
- return PrivateBluetoothSdkModule.setButtonPhotoSettings({size: settings.size ?? "max"} as any)
96
- },
97
- setButtonVideoRecordingSettings:
98
- PrivateBluetoothSdkModule.setButtonVideoRecordingSettings.bind(PrivateBluetoothSdkModule),
99
- setButtonCameraLed: PrivateBluetoothSdkModule.setButtonCameraLed.bind(PrivateBluetoothSdkModule),
100
- setButtonMaxRecordingTime: PrivateBluetoothSdkModule.setButtonMaxRecordingTime.bind(PrivateBluetoothSdkModule),
88
+ setPhotoCaptureDefaults: PrivateBluetoothSdkModule.setPhotoCaptureDefaults.bind(PrivateBluetoothSdkModule),
89
+ setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) =>
90
+ PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps),
91
+ setMaxVideoRecordingDuration: PrivateBluetoothSdkModule.setMaxVideoRecordingDuration.bind(PrivateBluetoothSdkModule),
101
92
  setCameraFov: PrivateBluetoothSdkModule.setCameraFov.bind(PrivateBluetoothSdkModule),
102
93
  queryGalleryStatus: PrivateBluetoothSdkModule.queryGalleryStatus.bind(PrivateBluetoothSdkModule),
103
94
  requestPhoto: PrivateBluetoothSdkModule.requestPhoto.bind(PrivateBluetoothSdkModule),
@@ -155,7 +146,7 @@ export type {
155
146
  BluetoothSdkPublicModule as BluetoothSdkModule,
156
147
  BluetoothSdkSubscription,
157
148
  ButtonPhotoSize,
158
- ButtonPhotoSettings,
149
+ PhotoCaptureDefaults,
159
150
  ButtonPressEvent,
160
151
  CameraFovPreset,
161
152
  CameraFovRequest,
@@ -226,6 +217,7 @@ export type {
226
217
  SwipeVolumeStatusEvent,
227
218
  SwitchStatusEvent,
228
219
  TouchEvent,
220
+ VideoRecordingDefaults,
229
221
  VideoRecordingStartedStatusEvent,
230
222
  VideoRecordingStatusEvent,
231
223
  VideoRecordingStatusState,