Skip to content

Build for Windows, Big File Dialog, Drag-n-Drop#54

Open
abakum wants to merge 453 commits intohoweyc:masterfrom
abakum:master
Open

Build for Windows, Big File Dialog, Drag-n-Drop#54
abakum wants to merge 453 commits intohoweyc:masterfrom
abakum:master

Conversation

@abakum
Copy link
Copy Markdown
Contributor

@abakum abakum commented Jul 16, 2025

No description provided.

abakum added 30 commits April 23, 2026 13:33
Add updatePipSize() to calculate PiP width and height dynamically from
the local video aspect ratio and controls panel height. Remove fixed
PiP dimensions from CSS media queries. Add width and height to CSS
transitions for smooth animation. Ensure PiP avoids overlapping the
controls area.
Add a screen-share button to the local video PiP overlay. Toggling
starts getDisplayMedia and replaces the camera track in the local
stream; the remote video is automatically moved to native
Picture-in-Picture so the peer stays visible. When the display track
ends (via browser UI or a second click) the camera stream is restored.
The button is hidden if the display-media API is unavailable.
Add a record button to the PiP controls allowing users to save call
recordings directly to a local file. Uses MediaRecorder with the File
System Access API, supports WebM/MP4 output, and restarts the
recorder when starting to ensure a valid init segment is written.
Replace the PiP left/right movement buttons with a "Record Peer"
button to save the remote video stream locally via the File System
Access API. Removes the unused pip-move CSS/JS logic and adds state
management for peer recording.
- Replace pip-controls flex container with absolute positioning for mic,
  cam, and new flip buttons inside the pip container
- Add flip camera button to toggle local video facing mode
- Adjust mic and cam button positions to bottom corners of pip view
- Add `.pending` class to distinguish recording initialization from active state
- Replace 🔴 with ⏺ icon for local and peer record buttons
- Change disabled mic/camera button color from red (#e94560) to neutral gray (#555)
Increase the picture-in-picture container minimum width from 60px to
120px in both CSS and JS resizing logic. Change video object-fit from
cover to contain to prevent cropping and preserve aspect ratio.
Enlarge chat and video control buttons to 36px for better touch
accessibility. Replace chat button labels with emoji-only icons
to reduce clutter. Remove media queries that downsized buttons
on small screens. Add emoji CSS class for consistent icon sizing.
* Rework protocol diagram with host/guest roles & relay echo logic
* Add click toggle behaviour for main video player controls
* Implement debounce timer for media recorder restarts
* Remove unused legacy lastHandledMpx debounce variable
* Document echo mode server/client logic for single peer rooms
…tability

* Introduce flags to track peer-initiated mic/cam privacy disable state
* Reduce emergency stall seek debounce from 3000ms to 1000ms for responsiveness
* Enforce mutual exclusivity between incompatible VP8 / AAC codecs
* Add automatic media toggle when peer disables all supported codecs
* Remove redundant generic fallback mime types from codec detection
* Reset privacy flags when user manually controls camera/microphone
Replace random TLS certificate generation with a deterministic approach.

By using a hardcoded private key and generating a deterministic serial number based on a SHA-256 hash of the sorted IP addresses, the generated certificate remains consistent for the exact same set of IPs. Additionally, the certificate validity period is fixed to a 100-year window.

This ensures that users only need to accept the browser security exception once, rather than being prompted again every time the application restarts.
- Fit button toggles to mirror (🪞) on repeated click, applying
  scaleX(-1) to remote video. Mirror and fit modes are independent,
  stored as single value 0-7 in localStorage.
- Extract acquireCamera() function for two-phase camera acquisition
  with aspect detection, reuse in camBtn and privacy restore.
- Add audioBeforeScreenShare variable, comment out STALL_DEBOUNCE_MS.
Replace emoji text-based mirror toggle on the Fit button with a CSS
`scaleX(-1)` class, simplifying code and improving visual consistency.

Merge separate video and audio `getUserMedia` calls into a single
combined request with a fallback to sequential requests. This reduces
cold-start overhead on Linux by initializing the media stack only once,
while preserving audio constraints (echo cancellation, noise suppression,
auto-gain control).
- Integrate EWMA-based BUST adaptation derived from median and last chunk sizes
- Reset BUST smoothing state on resolution change to avoid stale tuning
- Increase max MSE queue to 150 and set buffer cap to 30 seconds
- Relax speed limits (RATE_MAX=1.15, RATE_MIN=0.85) and add SOFT_CATCHUP
Replace the File System Access API (showSaveFilePicker) with Origin Private File System (OPFS) for video recording. OPFS is more reliably available on Android WebView, improving compatibility. Added logic to create, download, and clean up OPFS files.
Add support for selecting specific cameras on desktop platforms. This change introduces camera enumeration and persistence of the selected camera across sessions.

Key changes:
- Add camera enumeration via `navigator.mediaDevices.enumerateDevices()`
- Persist selected camera using localStorage
- Hide flip button on desktop when only one camera is available
- Refactor camera constraint building to use deviceId for precise selection

This improves usability on desktop systems with multiple cameras.
- Add variables to store native camera max resolution from getCameraCapabilities
- Replace hardcoded 4:3 aspect ratio with dynamic fallback (16:9) based on camera capabilities
- Enhance 0.5MPx button to toggle between 0.5MPx and maximum camera resolution
- Remove forced resolution restoration after camera flip to avoid conflicts with new camera's aspect ratio
- Reduce MSE queue and buffer duration (150→100, 30s→20s) for lower latency
- Adjust adaptive catch-up threshold (1000ms→500ms) for faster response
- Fix screen sharing resolution using devicePixelRatio
- Exclude screen sharing from camera aspect ratio calculations
- Improve diagnostic log format for better readability
- Reduce CHUNK_INTERVAL_MS from 100 to 50 and TARGET_FPS from 15 to 10 for smoother streaming
- Implement EWMA cache to preserve adaptive bitrate state across resolution changes
- Increase MAX_BUFFER_SEC from 20 to 30 for better buffering
- Simplify adaptive catch-up algorithm with zone-based control using EWMA behind/deviation
- Add currentRawBehind tracking for improved latency monitoring
- Adjust BEHIND_MIN from 0.5 to 0.4 seconds
- Add KEY_FRAME_INTERVAL=1 to MediaRecorder for faster stall recovery
- Full buffer clear (abort + remove) before MSE restart to prevent
  codec mismatch errors from stale chunks
- Increase CHUNK_INTERVAL_MS from 50→100, run main processing loop
  at CHUNK_INTERVAL_MS/2 for smoother playback
- Reduce BEHIND_MIN from 0.4→0.3s for tighter live-edge tracking
- Derive EMERGENCY_BEHIND from current BUST value dynamically
- Use MAX_MSE_QUEUE constant in mseQueueCompact instead of hardcoded 100
- Remove dead commented-out code (recvKbps estimation, trim logging,
  unconditional play() safety net)
- Reorganize adaptive settings initialization for clarity
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