Skip to content

fix: WHIP/WHEP endpoint handling and vision mixer multiview API#476

Merged
srperens merged 8 commits intomainfrom
fix/whip-whep-endpoint-handling
Apr 7, 2026
Merged

fix: WHIP/WHEP endpoint handling and vision mixer multiview API#476
srperens merged 8 commits intomainfrom
fix/whip-whep-endpoint-handling

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

@srperens srperens commented Apr 7, 2026

Summary

  • Reject duplicate WHIP/WHEP endpoint IDs at registration time — the second flow to register the same endpoint now fails to start with a clear error instead of silently overriding the first
  • Trim whitespace from endpoint strings at three layers: API save, pipeline build, and frontend duplicate detection
  • Show a warning in the frontend property inspector when an endpoint ID is already in use by another block
  • Replace fragile .contains("multiview") string matching in vision mixer with link traversal from the multiview_out pad
  • Add GET /api/flows/{flow_id}/blocks/{block_id}/multiview-endpoint API endpoint and have the vision mixer HTML page use it instead of duplicated server-side logic
  • Move OpenAPI spec to openapi.json in repo root for discoverability

Test plan

  • Create two flows with WHIP input blocks using the same endpoint ID — second flow should fail to start
  • Create two flows with WHEP output blocks using the same endpoint ID — second flow should fail to start
  • Verify frontend shows warning when entering a duplicate endpoint ID
  • Verify endpoint strings with leading/trailing whitespace are trimmed on save
  • Verify vision mixer multiview preview works with direct and indirect (through encoder) WHEP connections
  • Verify GET /api/flows/{flow_id}/blocks/{block_id}/multiview-endpoint returns correct endpoint
  • Run cargo test --test openapi_test to verify spec is up to date

🤖 Generated with Claude Code

Per Enstedt and others added 8 commits April 7, 2026 12:13
Endpoint IDs were not globally unique — two flows could register the
same endpoint name and the later one would silently override the first,
causing misrouted traffic. Now registration returns an error and the
flow fails to start with a clear message.

Also trims whitespace from all endpoint-related string properties at
three layers: the API save handler, the pipeline build phase, and the
frontend duplicate-detection UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the fragile .contains("multiview") string match with link
traversal from the vision mixer's multiview_out pad through any
intermediate blocks until a WHEP output block is reached.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract link-traversal logic into reusable find_whep_endpoint_for_pad()
helper. Add GET /api/flows/{flow_id}/blocks/{block_id}/multiview-endpoint
that returns the WHEP endpoint path for the multiview output.

The vision mixer HTML page now fetches the endpoint from the API at
connect time instead of relying on the server-injected config value,
removing duplicated logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move openapi_snapshot.json to openapi.json in the repo root — a more
conventional and discoverable location for external consumers.
Rename the test file to openapi_test.rs accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add fallback to old path for base branch comparison during transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Node.js 20 actions are deprecated and will stop working June 2026.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… workflows

Node.js 20 actions are deprecated and will stop working June 2026.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
docker/setup-buildx-action v3→v4, docker/login-action v3→v4,
docker/build-push-action v5→v6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@srperens srperens merged commit db1bd14 into main Apr 7, 2026
7 checks passed
@srperens srperens deleted the fix/whip-whep-endpoint-handling branch April 7, 2026 11:46
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.

1 participant