Skip to content

Share or download an event clip from mobile

Every event in NovaVMS has a recorded clip stored in the cloud and served via a presigned URL. The mobile Event detail screen exposes a Share button (visible to every role) and a Download button (visible to admin and owner only).

Both buttons route through the same underlying flow on mobile in v1.5.x: download the clip to local storage, then hand the local file URI to the native share sheet. Recipients get the actual .mp4 file, not a plaintext URL.

Open an event

  1. Tap the Events tab. The list shows the most recent events for cameras you can see, with the AI-generated thumbnail and a one-line description.
  2. Tap any row to open Event detail.

Event detail mounts the clip player at the top (expo-video AVPlayer / ExoPlayer, the same stack as live H.265). Below the player you see:

  • A scrubbable timeline with markers for the AI-detected tags
  • Speed chips: 1×, 2×, 4× (top-right of the player; hidden when the clip cannot play)
  • The AI description, tags, and provider/model
  • A four-cell action grid: Ask AI, Similar, Go live, Star
  • Camera + source + duration + ONVIF context metadata

The top bar holds Back, the camera name + local-time start, and on the right: Share, and (admin/owner only) Download.

Share — the recipient gets the actual clip file

Tap Share. The app:

  1. Checks that the device supports the share sheet (expo-sharing.isAvailableAsync()).
  2. Downloads the presigned clip URL into the app’s document directory (idempotent — a second tap on the same event reuses the same local file).
  3. Hands the local file:// URI to Sharing.shareAsync() with MIME type video/mp4 and UTI public.mpeg-4.

The native share sheet now offers every share target the OS knows about — Messages, Mail, AirDrop, Slack, WhatsApp, Save to Files, etc. — and the recipient gets the playable MP4 attached.

Why we don’t just send a URL

Earlier versions of the app shared a novavms:// deep link or the presigned URL via React Native Share. Two problems:

  • On Android, ACTION_SEND drops the url field when both url and message are passed. Recipients saw plaintext only with no link.
  • A presigned URL expires in minutes. By the time a recipient taps “Open” on a text-message link, the URL has often expired.

The download-then-share flow eliminates both. The trade-off is the upfront download — on a 50 MB clip over LTE this can take 5–10 seconds. The app shows the share sheet only after the download completes; if you cancel by switching apps, the partial file is left in the cache and the next tap restarts.

If the download fails (presigned URL already expired, cloud 5xx), you see one of these alerts naming the failing step:

AlertCause
”Sharing unavailable: …”The OS reports no share-sheet capability (rare; restricted devices)
“Download failed — Could not save the clip: …”The presigned URL fetch failed
”Share failed: …”The share sheet itself rejected the file (uncommon)

Tap the back arrow, then Share again to retry.

Download — admin and owner only

Tap Download (visible only when your role is admin or owner). The flow is the same as Share, but the dialog title is Save clip instead of Share clip, which routes the share sheet toward “Save to Files” / “Save to Drive” rather than messaging targets.

Download is audit-logged. The cloud records who downloaded which event clip when, so chain-of-custody is preserved.

Viewer and operator users do not see the Download button. They can still Share via the same target picker.

Star + Find similar + Ask AI

While you’re on Event detail you can also:

  • Star the event so it’s easy to find later via the Events tab’s Starred filter.
  • Similar — open a vector-search sheet of events whose visual or tag pattern matches this one. Tap any row to drill into that event without losing the current one (the back stack remembers).
  • Ask AI — open a chat bottom-sheet that lets you ask follow-up questions about this event. The conversation is org-scoped; ask the team’s AI provider what it sees in the clip, what context it has, etc.
  • Go live — closes the clip player (releasing its decoder), then jumps to the camera’s live view. The release-before-navigate dance is intentional: iOS AVPlayer cannot hold two HEVC decoders open at once, so the clip player must release its decoder before the live tile mounts.

When the clip cannot play

If the recording failed at capture time (gateway disconnect during a triggered clip) or the storage layer lost the file, the Event detail screen swaps in a Clip unavailable overlay over the player:

This event’s clip could not be loaded. The recording may be missing or corrupted.

[Go to live view]

The speed chips, transport buttons, and scrubber all disable while this overlay is up. Share and Download both alert “Not available: Clip URL is not yet available to share / download” if you tap them in this state.

What this screen does NOT do (v1)

  • No in-app preview before sharing. Tapping Share immediately downloads + opens the share sheet. To preview, just play the clip in the player above.
  • No multi-event share. One event at a time.
  • No download-to-album. Saving to the device’s Photos / Gallery requires “Save to Files” via the share sheet (or a third-party app picker). The app cannot directly write into the photo library in v1.
  • No share via QR code. Out of scope.