1.1 KiB
1.1 KiB
ECP-0057: Direct-Publish Session Reconnect + Busy Listing Semantics
Status: Draft
Problem
ec-node direct-publish (direct WebRTC + CMAF over DataChannel) is currently a 1:1 stream.
Two concrete issues hurt reliability:
- Directory entries can remain visible while a session is already connected, causing new viewers to click "Watch" and silently fail.
- If a viewer disconnects (reload, laptop sleeps, etc), the publisher has no way to accept a new viewer without restarting the process.
Proposal
- Make
direct-publisha session loop:- Create a fresh PeerConnection offer.
- Announce it to the directory.
- Wait for one answer.
- Stream until send fails / ffmpeg ends.
- Restart with a new offer.
- Once a session is connected, stop refreshing announcements and quickly expire the directory entry (so the directory reflects joinable streams only).
This preserves the current 1:1 nature while making reconnection and "send a link" behavior much more robust.
Non-Goals (For Now)
- True 1:many fanout / relaying for direct streams.
- Multi-viewer, simultaneous subscriptions to the same publisher connection.