Skip to content

Recon Video and Audio

Stream live and recorded video from each of a Recon robot's cameras, and its live audio: get the stream URLs for every camera with getAllMediaUris, pick the camera you want, and play it like any Rhombus camera.

On this page

A robot carries one or more cameras and a microphone. Each one is a facet of the robot: video facets are named v0, v1, and so on, and audio facets a0. Their streams work the same way as a Rhombus camera's, so the streaming guides and Media and streams apply. The examples use the robot_api helper from the overview.

You need a credential with live-only access to the robot for live streams, and read-only access for recorded video.

Get the stream URLs

getAllMediaUris returns the URLs for every facet at once:

Python
media = robot_api("getAllMediaUris", {"deviceUuid": ROBOT_UUID})
for facet, uris in media["videoFacetUris"].items():
    print(facet, uris.get("wanLiveM3u8Uri"))
for facet, uris in media["audioFacetUris"].items():
    print(facet, uris.get("wanLiveOpusUri"))
FieldContains
videoFacetUrisFor each video facet: wanLiveM3u8Uri (HLS), wanLiveMpdUri (DASH), wanLiveH264Uri (H.264 over WebSocket), wanVodM3u8UriTemplate and wanVodMpdUriTemplate (recorded video), and the lan… equivalents
audioFacetUrisFor each audio facet: wanLiveOpusUri (Opus over WebSocket) and lanLiveOpusUris
wanLiveRobotUriThe robot's live socket, for control and telemetry
lanCheckUrlsURLs that answer 204 when your client can reach the robot on the local network

Fetch the URLs again before you reconnect to a stream. The robot's media host can change.

Choose a camera

getFullState says which facets the robot has and which way each camera points:

Python
state = robot_api("getFullState", {"deviceUuid": ROBOT_UUID, "force": False})["fullState"]
directions = (state.get("robotPlatformCapability") or {}).get("facetOrientationDegrees") or {}
names = state.get("facetNameMap") or {}
for facet in state.get("supportedFacets", []):
    if facet in media["videoFacetUris"]:
        print(facet, names.get(facet, ""), directions.get(facet), "degrees")
  • supportedFacets lists the facets the robot really has. Use only facets that appear both there and in getAllMediaUris.
  • facetOrientationDegrees gives each camera's direction, counterclockwise from the robot's forward direction: 0 looks forward, 180 looks back.
  • facetNameMap has each facet's name.

Play live video

Play a facet's URL like a camera's. In a browser, mint a federated token on your server and add it to the URL:

JavaScript
const url = `${videoFacetUris.v0.wanLiveM3u8Uri}?x-auth-scheme=federated-token&x-auth-ft=${encodeURIComponent(token)}`;
if (video.canPlayType("application/vnd.apple.mpegurl")) {
  video.src = url;
} else {
  const hls = new Hls();
  hls.loadSource(url);
  hls.attachMedia(video);
}

From a server or native app, send your API key headers on every request instead. DASH and the H.264 WebSocket work as described in Live and recorded video.

Recorded video

The wanVodM3u8UriTemplate and wanVodMpdUriTemplate of a facet play what that camera recorded. Replace {START_TIME} (Unix time in seconds) and {DURATION} (seconds) in the template:

Python
template = media["videoFacetUris"]["v0"]["wanVodM3u8UriTemplate"]
url = template.replace("{START_TIME}", str(start_seconds)).replace("{DURATION}", "300")

To find the moments worth watching, use the robot's events: each arrival at a patrol stop has a timestampMs.

Live audio

wanLiveOpusUri is a WebSocket that streams Opus audio from the robot's microphone. Authenticate it like the H.264 WebSocket (WebSocket (H.264 and audio)).

On the local network

When your client is on the robot's network, request one of the lanCheckUrls. If it answers 204, use the lan… URLs for lower latency and no internet traffic. Streaming over LAN covers certificates and authentication on the local network.