camera-streaming
Installation
SKILL.md
Camera Streaming (iOS)
Guide for implementing camera streaming and photo capture with the DAT SDK.
For PCM audio delivered with this stream, use the audio-streaming skill.
Key concepts
- DeviceSession: The connection to the glasses. Create and start it first; it can stay connected with no camera attached.
- Camera: The capability you attach to a started
DeviceSessionwithaddCamera(config:). It owns theStream. - Stream:
camera.stream— start/stop streaming, capture photos, observe frames, state, and errors. - VideoFrame: Individual video frames. Use
.makeUIImage()to render, or.sampleBufferwhen you need the rawCMSampleBuffer(for example to write compressed frames to a file). - StreamConfiguration: Configure video codec, resolution, and frame rate.
- PhotoData: Still image captured from glasses (
.dataplus.format).
Treat "start a session" and "start the preview" as two separate user-visible steps, as the CameraAccess sample does. That keeps the session reusable when the user stops and restarts the preview.