Skip to content

DOCKS tab

The DOCKS tab is the streams tile’s surface for DJI docks assigned to this mission. Unlike TACLINK (which shows video-peer tracks in the LiveKit room), DOCKS shows the dock’s logical identity — you click a dock card and the console opens its drone-stream tile in DJI Cloud mode, routing through our DJI transport rather than TACLINK.

What the tab shows

Dock cards are driven by the DjiDockService.onlineDocks signal. Each card:

  • Dock name + serial number.
  • Status dot — green if the dock is not offline, grey if offline. The tab does not filter out offline docks; you can still see them but can’t open a stream.
  • Activity text — derived heuristically by dockActivityText(dock):
    • Offline → “Offline”.
    • Firmware upgrade running → “Upgrading”.
    • modeCode === 4 → “In Operation”.
    • modeCode === 3 → “Firmware”.
    • modeCode === 1 or 2 → “Debug”.
    • Aircraft flying / returning / landing → “Flying”.
    • activeStreams has entries → “Streaming”.
    • Dock reports idle → “Idle”.
    • Fallback → “Online”.
  • Battery chip — aircraft battery percentage (not the dock’s own internal UPS) via dock.aircraft?.battery?.percent. Only shown if available.

Lazy Firestore listener

When you switch to the DOCKS tab, the tile calls dockService.startListening() to kick the Firestore subscription on dji_docks (scoped to the mission). This avoids paying the Firestore-listener cost while the operator is on TACLINK or VMS. Once you visit DOCKS even once, the subscription stays active for the session.

Opening a dock

Click any card → the tile calls openDock(dock) which emits streamSelected:

{
peerId: '', // empty — we don't bind by peer
trackId: VIDEO_DRONE_TRACK_ID,
isDrone: true,
dockSn: 'XXXX…',
mode: 'djiCloud' // critical — routes via DJI transport
}

The mode: 'djiCloud' is what distinguishes this flow from the TACLINK tab. The drone-stream tile listens for streamSelected, sees djiCloud, and configures its transport adapter to use the DJI Cloud interface (MQTT for commands, WHIP video that auto-stream has already provisioned).

If the dock has multiple aircraft cameras and you want to pick a specific one, the drone-stream tile exposes the lens + camera selectors after it’s bound.

What DOCKS is NOT for

  • Not an admin surface. If you want to assign/release docks, provision firmware, or push FlySafe licences, go to Admin → DJI management.
  • Not for unassigned docks. DOCKS shows only docks with missionId == currentOperationId. Docks in the same org that are assigned to a different mission don’t appear here.
  • Not a replacement for TACLINK on DJI peers. Once a dock is on auto-stream, its video peer also shows in TACLINK. Both tabs can open the same dock — DOCKS routes via djiCloud mode, TACLINK routes via the peer-identity path. The end user experience in the drone-stream tile is almost identical; the mode flag just selects which transport adapter handles commands like lens change and DRC.

Filtering & sorting

No explicit filter UI — every assigned dock appears. Order is arbitrary (whatever Firestore returns). If you have many docks, use Admin → DJI management for the comprehensive filtering + sorting surface.

Status changes in real time

The subscription is reactive — a dock going online, completing a firmware upgrade, or taking off live-updates the card’s activity text and battery chip without a refresh.

Known limitations

  • No filter UI (search, team, model) in the current build.
  • No drag-and-drop to reorder cards.
  • Can’t start a stream from the card directly — you open the dock in the drone-stream tile, and auto-stream handles the video-ingress provisioning. If auto-stream didn’t fire (preconditions not met), the drone-stream tile will show a helpful error after binding.