session.camera records video on glasses that have a camera, like Mentra Live. startVideoRecording returns a recordingId; pass it to stopVideoRecording to end the clip.
src/background/index.ts
Camera needs the CAMERA permission and glasses with a camera. Declare a CAMERA permission and a CAMERA hardware requirement in your manifest, and check session.capabilities.hasCamera before calling.

Record

startVideoRecording resolves once the glasses report that recording started. Resolution and frame rate are optional. Omit them to use the device’s saved button-video settings. A lower fps (for example 5) keeps the glasses cooler and the file smaller on long recordings. It resolves with a VideoRecordingStarted:

Upload the recording

stopVideoRecording(recordingId) resolves to void. By default the clip stays on the glasses. To send it somewhere, pass an uploadUrl and the glasses upload the finished recording there with a multipart POST (the file is the video part):
Unlike a photo, the recording bytes don’t come back over the bridge: with an uploadUrl they go straight from the glasses to your endpoint, otherwise they stay on the device.

Errors

Every method returns a promise that rejects with { code, message } on failure. Wrap calls in try/catch and read code.
For stills, see Photos, which also covers field of view. For live video streaming, see Streaming.