Skip to content

Camera replacement dialog should mark RTSP options as preferred on Standalone and explain why #2904

Description

@rafaellehmkuhl

Context

CameraReplacementDialog.vue lets the user remap widgets when the vehicle's cameras change. When more than one replacement candidate exists, it shows a dropdown built from replacementItems:

  const replacementItems = computed(() => {
    return unusedAvailableStreams.value.map((corr) => {
      const info = videoStore.getStreamDisplayInfo(corr.externalId)
      return {
        internalName: corr.name,
        label: `${corr.name} (${info.protocolLabel} - ${info.resolution})`,
      }
    })
  })

RTSP and WebRTC entries are listed side by side with no hint that, on the Standalone (Electron) build, RTSP is the better pick — it goes straight to the camera instead of round-tripping through the vehicle's WebRTC pipeline, so it uses noticeably less vehicle CPU.

The dialog currently has no RTSP/Standalone guidance at all and does not import isElectron(). That guidance only exists in ConfigurationVideoView.vue (the "Add direct RTSP stream (Standalone)" section) and in the Lite-build error dialog in src/stores/video.ts:398.

Requested behavior

When running on Standalone (isElectron() from src/libs/utils.ts):

  1. Append a [Preferred] suffix to RTSP entries in the "Replace with" dropdown, so the label reads something like Main Camera (RTSP - 1920x1080) [Preferred].
  2. Add an info affordance in the dialog (info icon with tooltip, or a small note under the dropdown) explaining that Cockpit Standalone supports direct RTSP streams and that they perform better because they consume fewer of the vehicle's computing resources.

On Lite (browser) nothing changes — RTSP is not usable there anyway, so no suffix and no note.

Notes

  • Protocol is already available per entry via videoStore.getStreamDisplayInfo(corr.externalId).protocolLabel ('RTSP' / 'WebRTC'), so no new plumbing is needed.
  • Same reasoning arguably applies to the stream dropdowns in VideoPlayer.vue and MiniVideoRecorder.vue; if we go that way, the label-building and the info text should be shared rather than copy-pasted into each component.
  • Any new interaction (opening the tooltip, picking a replacement) should go through logUserAction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

electronIssues specific to the electron versionuxHas to do with the user experiencevideo

Fields

Priority

None yet

Start date

None yet

Target date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions