flutter_meta_wearables_dat 0.5.0
flutter_meta_wearables_dat: ^0.5.0 copied to clipboard
Flutter bridge to Meta's Wearables DAT for iOS and Android.
0.5.0 #
- Update to DAT SDK 0.7.0 on iOS and Android. Existing Dart APIs unchanged; new opt-in additions below — non-breaking, drop-in upgrade.
- New
openDATGlassesAppUpdate()— opens the Meta AI app to update the on-device DAT app. Pair with the newdatAppOnTheGlassesUpdateRequirederror code to drive a "tap to update" UI. - New
deviceStateStream()returningStream<DeviceState>for liveThermalLevelupdates. Lets apps warn the user before a thermal error stops the stream. - New
StreamSessionErrorcodes:thermalEmergency,peakPowerShutdown,batteryCritical, plus device-session variants (deviceThermalCritical,deviceThermalEmergency,devicePeakPowerShutdown,deviceBatteryCritical,datAppOnTheGlassesUpdateRequired,dwaUnavailable). - Inherits DAT 0.7.0 bug fixes: Android
checkPermissiondouble-resume crash, post-Bluetooth-reconnect stale state, photo capture timeout,ServiceConnectionleak during registration; iOS session stop propagation. - Display capability (new in DAT 0.7.0 for Ray-Ban Display glasses) is intentionally not bundled — to keep this package focused on camera. A future
flutter_meta_wearables_dat_displayadd-on will mirror the mock-device split.
0.4.0 #
- BREAKING: MockDeviceKit moved to a separate optional package,
flutter_meta_wearables_dat_mock_device. Production apps no longer linkMWDATMockDevice.xcframework(iOS) ormwdat-mockdevice(Android) and therefore no longer needNSCameraUsageDescription(iOS) or theCAMERApermission (Android) just to ship the plugin. The Apple App Store binary scanner previously rejected v0.3.x builds that omitted those strings because MockDeviceKit unconditionally linkedAVFoundation; that requirement is gone. - Apps that pair against a mock device for development should add
flutter_meta_wearables_dat_mock_devicetopubspec.yamland migrate calls — see the migration table below. The shape mirrors Firebase'sfirebase_core+ per-feature packages and Datadog'sdatadog_flutter_plugin+datadog_session_replay. - Mock APIs renamed (the
Mock*prefix is now redundant given the namespace):
| Before (0.3.x, core) | After (0.4.0, mock add-on) |
|---|---|
MetaWearablesDat.configureMockDevices(...) |
MetaWearablesDatMockDevice.configure(...) |
MetaWearablesDat.disableMockDevices() |
MetaWearablesDatMockDevice.disable() |
MetaWearablesDat.pairMockRayBanMeta() |
MetaWearablesDatMockDevice.pairRayBanMeta() |
MetaWearablesDat.unpairMockRayBanMeta(uuid) |
MetaWearablesDatMockDevice.unpairRayBanMeta(uuid) |
MetaWearablesDat.setMockPermission(p, s) |
MetaWearablesDatMockDevice.setPermission(p, s) |
MetaWearablesDat.setMockPermissionRequestResult(p, s) |
MetaWearablesDatMockDevice.setPermissionRequestResult(p, s) |
MetaWearablesDat.mockDevicePowerOn(uuid) |
MetaWearablesDatMockDevice.powerOn(uuid) |
MetaWearablesDat.mockDevicePowerOff(uuid) |
MetaWearablesDatMockDevice.powerOff(uuid) |
MetaWearablesDat.mockDeviceDon(uuid) |
MetaWearablesDatMockDevice.don(uuid) |
MetaWearablesDat.mockDeviceDoff(uuid) |
MetaWearablesDatMockDevice.doff(uuid) |
MetaWearablesDat.setMockCameraFeed(uuid, path) |
MetaWearablesDatMockDevice.setCameraFeed(uuid, path) |
MetaWearablesDat.setMockCameraFacing(uuid, f) |
MetaWearablesDatMockDevice.setCameraFacing(uuid, f) |
MetaWearablesDat.setMockCapturedImage(uuid, path) |
MetaWearablesDatMockDevice.setCapturedImage(uuid, path) |
- The
Permission,PermissionStatus, andCameraFacingenums (referenced exclusively by mock APIs) moved to the mock add-on. Import them fromflutter_meta_wearables_dat_mock_deviceafter migrating. - All non-mock APIs (
startRegistration,requestCameraPermission,requestAndroidPermissions,startStreamSession/stopStreamSession,capturePhoto,enableBackgroundStreaming/disableBackgroundStreaming, every event stream) keep the same signatures and behavior — production code that doesn't touch mock devices needs no changes other than potentially removingNSCameraUsageDescriptionandCAMERA.
0.3.1 #
- Fix: CMSampleBufferGetFormatDescription used with .hvc1 background streaming to correctly pass VPS/SPS/PPS and enable ffmpeg_kit_flutter use cases while backgrounded.
0.3.0 #
- BREAKING: Update to DAT SDK 0.6.0 on iOS and Android.
- New
setMockCameraFacing()to switch the mock device's camera between front and back; addsCameraFacing. - New
configureMockDevices(),disableMockDevices(),setMockPermission()andsetMockPermissionRequestResult()for finer-grained mock device control. - New
videoStreamSizeStream()exposing the native video frame dimensions so Dart can drive anAspectRatioaround theTexturewidget instead of forcing a fixed size. - New opt-in background streaming on both iOS and Android:
enableBackgroundStreaming(androidNotification:)/disableBackgroundStreaming()keep the session alive when the host app is backgrounded or the phone is locked. iOS activates anAVAudioSession(.playAndRecord/.videoRecordingwith.allowBluetoothHFP+.mixWithOthers) and forces software HEVC decoding so the decoder survives background→foreground without stutter. Android starts a foreground service of typeconnectedDevicewith a user-customizable notification (title/text/channelId/channelName/icon) and aPARTIAL_WAKE_LOCK; the plugin manifest auto-merges the requiredFOREGROUND_SERVICE,FOREGROUND_SERVICE_CONNECTED_DEVICE, andWAKE_LOCKpermissions. iOS hosts must addaudioandbluetooth-centraltoUIBackgroundModes. - New
videoFramesStream()emitting per-frameVideoFramepayloads (codec / bytes / width / height / presentationTimestampUs / isKeyframe) in both foreground and background, so apps can record to disk or run custom processing while the FlutterTexturecan't render. Zero per-frame cost when no subscriber is attached. iOS emits BGRA forrawand rawhvc1NAL units forhvc1; Android emits I420 planar YUV (width * height * 3/2bytes) verbatim from the SDK. - New
BackgroundNotificationvalue type for configuring the Android foreground service notification.
0.2.2 #
- iOS:
VideoCodec.hvc1— invalidateVTDecompressionSessionin background and recreate on foreground; stream session stays alive.
0.2.1 #
- Add AI coding agent configs (
AGENTS.md, Claude Code, Cursor, Copilot) withinstall-skills.shinstaller.
0.2.0 #
- BREAKING: Update to DAT SDK 0.5.0 on iOS and Android.
startStreamSession()gainsvideoCodecand newVideoCodec:raw(default, foreground-only) orhvc1(compressed HEVC, background-friendly, iOS only).- New
streamSessionStateStream()andstreamSessionErrorStream()to observe session lifecycle (stopped, streaming, paused, …) and errors such as thermal limits; addsStreamSessionStateandStreamSessionError. capturePhoto()gainsformatand newPhotoCaptureFormat:heicorjpeg(defaultjpeg).- Android: Photo capture failures use typed
CaptureError(e.g. DeviceDisconnected, NotStreaming, CaptureInProgress, CaptureFailed). - High-resolution streaming at 720×1280 works reliably on both platforms.
0.1.2 #
- Add
captureStreamFramemethod.
0.1.1 #
- Add performance optimizations.
0.1.0 #
- Implement Texture API for streaming optimization.
- Add
streamQualityparameter. - Improve documentation and example app.
0.0.3 #
- Fix demo gif in README.
0.0.2 #
- Improve pub.dev package page.
0.0.1 #
- Initial release.