Repository navigation
Add opt-in WebRTC spectator state with authorized SSE fallback - #24
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native viewers can optionally carry the existing state stream over a reliable ordered WebRTC DataChannel. The browser keeps SSE during negotiation and falls back to the same authorized route on failure. Legacy hosts keep SSE without RTC probing; publisher WSS, original resources, same-body identity checks and owner/public projection remain unchanged. This is browser-to-portal transport only, read-only, with no Minecraft action replay or extra body.
The host injects its peer backend. The implementation bounds SDP, messages, peers, queued bytes and negotiation time, rechecks permissions, tears down revoked/offline sources, and packages the matching host/codec/browser artifact. Production is not enabled by this source change, and no WAN performance improvement is claimed.
Validation: 71 focused checks including real ICE/DTLS/SCTP; complete renderer tools suite 1606 passed / 43 conditional asset skips, including actual portable build/import; 8 real headless Edge fixture checks passed with zero page errors. Full gameplay/render parity and public NAT testing remain separate. A pinned optional Werift wire backend is exercised by the new CI workflow. Setup and exact boundaries: docs/spectator-webrtc.md.