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)
CallstartStream() 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
Passdirect 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

