Skip to content

Prioritize camera_entity over SIP video stream when both configured#180

Open
Copilot wants to merge 3 commits intomainfrom
copilot/update-video-prioritization
Open

Prioritize camera_entity over SIP video stream when both configured#180
Copilot wants to merge 3 commits intomainfrom
copilot/update-video-prioritization

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

When sip_video is enabled and camera_entity is configured for an extension, the SIP video stream was displayed instead of the camera entity. This changes the priority so camera_entity takes precedence.

Changes

Modified display logic in sip-call-dialog.ts and sip-call-card.ts:

  • Remove remoteVideoStream === null condition when checking for camera_entity
  • Hide <video> element when camera_entity is present: remoteVideoStream === null || camera
  • Clean up audioVisualizer when camera or video is displayed

Before:

if (
    sipCore.callState !== CALLSTATE.IDLE &&
    sipCore.remoteExtension !== null &&
    sipCore.remoteVideoStream === null  // Only check camera when no video
) {
    camera = this.config.extensions[sipCore.remoteExtension]?.camera_entity || "";
}

After:

if (
    sipCore.callState !== CALLSTATE.IDLE &&
    sipCore.remoteExtension !== null  // Check camera regardless of video stream
) {
    camera = this.config.extensions[sipCore.remoteExtension]?.camera_entity || "";
    if (!camera && sipCore.remoteVideoStream === null) {
        // Only show audio visualizer when no camera AND no video
    } else {
        this.audioVisualizer = undefined;  // Cleanup when camera/video present
    }
}

Display priority is now: camera_entity → SIP video → audio visualizer


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 29, 2026 00:28
Co-authored-by: TECH7Fox <32220029+TECH7Fox@users.noreply.github.com>
Co-authored-by: TECH7Fox <32220029+TECH7Fox@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure camera entity takes priority over video when enabled Prioritize camera_entity over SIP video stream when both configured Jan 29, 2026
Copilot AI requested a review from TECH7Fox January 29, 2026 00:32
@TECH7Fox TECH7Fox marked this pull request as ready for review February 1, 2026 15:42
@TECH7Fox
Copy link
Owner

TECH7Fox commented Feb 1, 2026

Fixes #181

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants