session.camera.takePhoto captures a still on glasses that have a camera, like
Mentra Live. It resolves after the photo is captured and uploaded, and hands you
back a download URL.
src/background/index.ts
CAMERA permission and glasses with a camera. Declare a
CAMERA permission in your manifest
so the call is allowed, and a CAMERA hardware requirement so the miniapp only
installs on glasses that can capture. Check session.capabilities.hasCamera
before calling so you don’t fire a request the glasses can’t satisfy.
Take a photo
takePhoto sends the request, waits while the glasses capture and the phone
uploads, then resolves with the photo metadata. The returned photoUrl is a
signed download URL with a short TTL (about 30 minutes), so fetch or display it
soon after.
Unknown runtime
transferMethod values are rejected instead of being treated as "auto".
The result is a PhotoTaken:
Field of view
setFov applies a temporary FOV/ROI override owned by the calling miniapp and
resolves after the ASG client reports it was applied. It applies to all captures
(photos and video) while that miniapp is active. When the miniapp closes, the host
restores the previous live miniapp override or the persistent base setting. The
factory/missing base is the centered standard preset (102 degrees); existing
saved user values are preserved.
It resolves with a
CameraFovResult:
Errors
Every method returns a promise that rejects with{ code, message } on failure.
Wrap calls in try/catch and read code.

