Skip to main content
The Camera Module provides photo capture and video streaming for MentraOS apps.

Available Features

Photo Capture

Take high-quality photos from smart glasses with options for gallery saving and raw buffer access.

Video Streaming

Stream live video from smart glasses:
  • Livestream (startLivestream) — Zero infrastructure. Low-latency WebRTC by default. Add restreamDestinations to go live on YouTube, Twitch, etc. Multiple apps can share the same stream.
  • Local Livestream (startLocalLivestream) — Stream directly to your own endpoint via SRT, RTMP, or WHIP. Exclusive camera access.
See the Video Streaming guide for details and API reference.

Quick Start

Taking a Photo

const photo = await session.camera.requestPhoto({ saveToGallery: true });
console.log(`Photo captured: ${photo.mimeType}, ${photo.size} bytes`);

Starting a Livestream

const result = await session.camera.startLivestream();
console.log('WebRTC playback URL:', result.webrtcUrl);

Streaming to Your Own Server

// SRT
await session.camera.startLocalLivestream({ streamUrl: 'srt://your-server.com:4201?streamid=key' });

// RTMP
await session.camera.startLocalLivestream({ streamUrl: 'rtmp://your-server.com/live/key' });

Important Notes

  • Permissions: Camera access requires the CAMERA permission. See Permissions Guide.
  • Hardware: Only available on camera-equipped glasses (e.g., Mentra Live)
  • Battery: Extended streaming drains battery quickly
  • Privacy: Always notify users when camera is active

See Also