Files
KoalaSync/shared
Timo d6665fe0f5 feat: v2.0.0 - enhanced debug reports, platform detection, copy report, mockup i18n, new icons
- Copy Logs button now generates full Markdown debug report (system, tab, connection, video, history, logs)
- Enhanced Dev tab with 20+ video state fields (network, dimensions, error, shadow DOM, platform detection)
- Platform auto-detection (YouTube, Netflix, Twitch, Prime Video, Disney+, Hulu, HBO, Vimeo, Dailymotion)
- 'No video found' diagnostic mode with hints
- Convert mockup from inline <span lang> to {{MOCK_*}} template vars (all 6 languages)
- New TwoPointZero branding: icons (16/32/48/96/128), favicons (PNG 16/32 + apple-touch + 192)
- Fix logo vertical centering via display:contents on picture wrappers
- Increase popup logo to 48px, website nav logo to 64px
- AVIF quality 70->80, speed 6->4, remove min 3KB threshold
- Add 32+96 icon sizes to manifest
- Remove amazon. from tab blacklist (unblocks Prime Video)
- Update TESTED_SERVICES.md: mark Prime Video as non-functional
- Update CONTRIBUTING.md with Copy Debug Report workflow
2026-06-01 15:49:55 +02:00
..

KoalaSync Shared Constants

This directory contains constants and protocol definitions used by both the extension and the server.

Syncing with the Extension

Important

Every time this directory is modified, you must run node scripts/build-extension.js to keep the extension's copy up to date.

Because Browser Extensions (Manifest V3) cannot load files outside their root directory, all files in this directory must be copied to extension/shared/ whenever they are modified. The build script handles this automatically.

Security & Versioning Constants

  • OFFICIAL_SERVER_TOKEN: A 32-byte hex token required to connect to the official relay server.
  • APP_VERSION: The current version of the extension. Automatically injected from the git tag during CI release builds.
  • OFFICIAL_SERVER_URL: The default endpoint for the official KoalaSync relay.

Protocol Events

For the complete and current event list, see the EVENTS object in constants.js. Key events include:

Event Direction Purpose
JOIN_ROOM Client → Server Request to join a room with credentials
LEAVE_ROOM Client → Server Leave the current room
ROOM_DATA Server → Client Current room state (peers list)
PLAY / PAUSE / SEEK Bidirectional relay Media control commands
PEER_STATUS Bidirectional relay Heartbeat or join/leave notification
FORCE_SYNC_PREPARE Bidirectional relay Phase 1: Pause & seek to target time
FORCE_SYNC_ACK Bidirectional relay Phase 1 confirmation: peer is buffered
FORCE_SYNC_EXECUTE Bidirectional relay Phase 2: Resume playback simultaneously
EVENT_ACK Server → Client Delivery confirmation for UI feedback
EPISODE_LOBBY Bidirectional relay Episode transition: waiting for all peers
EPISODE_READY Bidirectional relay Episode confirmation: peer has loaded
GET_ROOMS / ROOM_LIST Client ↔ Server Room discovery
ERROR Server → Client Error message