Skip to content

Make ShareScreenRTC serverless: QR-based offer and compact response tokens#3

Open
espmaniac wants to merge 34 commits into
mainfrom
codex/create-local-html-webrtc-streaming-site
Open

Make ShareScreenRTC serverless: QR-based offer and compact response tokens#3
espmaniac wants to merge 34 commits into
mainfrom
codex/create-local-html-webrtc-streaming-site

Conversation

@espmaniac

Copy link
Copy Markdown
Owner

Motivation

  • Replace the previous Python-based signaling workflow with a serverless flow that shares the offer via QR and accepts a typed short code plus a compact response token from the viewer.
  • Simplify usage for static hosting or direct file open, removing the requirement to run server.py or a separate HTTP server.
  • Improve UX for mobile viewers by embedding the offer in a QR URL and providing a compact, compressed response token that the broadcaster pastes in.

Description

  • Rewrite of index.html to remove server polling and server endpoints, add serverless flows (startBroadcast, joinBroadcast) and UI for site code, response code and compact response token.
  • Implement compact token encoding/decoding utilities including b64urlEncode/b64urlDecode, optional gzip compression via CompressionStream, and encodeCompactPayload/decodeCompactPayload.
  • Change peer-connection logic: offerer flow generates a QR URL containing a base64url-encoded offer, viewer flow creates a short verifier code (SHA-256-derived) and returns a compact token containing the answer and verifier, and the broadcaster verifies site code and response code before applying the answer.
  • Update styling and page copy and simplify README.md to document the new serverless flow, run options (Local file or Static host URL) and notes about local-network RTCPeerConnection({ iceServers: [] }) behavior.

Testing

  • No automated tests were added or executed for this change.

Codex Task

espmaniac added 28 commits March 8, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant