Skip to main content
Mentra Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.There is currently no way to distribute a miniapp built with the Miniapp SDK. In a future release, developers will upload miniapps through the Mentra Developer Console, and users will download them from the Mentra Miniapp Store. Neither service supports Miniapp SDK distribution in MentraOS 3.0.Only use the Miniapp SDK if you are comfortable with these limitations.Developing on Mentra Live? We recommend using the Mentra Bluetooth SDK.The developer tools are available in the Mentra App under Settings → Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at help@mentra.glass.
session.stream starts and stops a live video stream from camera glasses like Mentra Live. One method, startStream, covers both ways to stream: Mentra hosts it for you (the default), or you publish straight to a URL you own.
src/background/index.ts

Managed streaming (default)

Call startStream() with no direct URL and Mentra provisions a hosted stream, handles transport and reconnection, and returns playback URLs. This is the right choice for most apps.
src/background/index.ts

Direct streaming

Pass direct with your own ingest URL (rtmp/rtmps/srt/whip) and the glasses publish straight to it, with no Mentra relay. You manage the endpoint, and no playback URLs come back.
src/background/index.ts
video, audio, and sound work the same as managed. destinations and ingest are ignored for direct streams.

Result

startStream resolves to a StreamResult:

Stop

stop ends the stream. Pass the streamId from the start result, or omit it to stop the active stream.
src/background/index.ts