feat(desktop): port v0.11.4-v0.15.2 from Tauri to Electron + Discord-parity audio (v0.16.0)

Chronological port of every Tauri release commit (v0.11.4 -> v0.15.2)
into the Electron rebuild, plus Discord-style audio handling that goes
beyond the Tauri original.

Highlights:
  - All 17 Tauri release commits ported (audio fixes, custom notification
    sound, Discord-style chat UX, profile banner, changelog page,
    Discord-parity call UX, screen-share echo + re-watch UX, audio-loop
    fix).
  - Native napi-rs audio-loopback addon with WASAPI process-loopback:
      * EXCLUDE_TARGET_PROCESS_TREE for full-screen shares -> peers
        never hear themselves echoed back through the capture.
      * INCLUDE_TARGET_PROCESS_TREE for window shares -> only the
        picked window's audio is captured, not the whole OS mixer
        (Discord parity).
      * HWND -> PID resolution via Win32 GetWindowThreadProcessId.
  - Discord-style screen-source picker (thumbnail grid, screens vs
    apps tabs, live-refreshing thumbnails).
  - Hash routing fix for packaged builds (file:// can't resolve
    BrowserRouter paths).
  - Tauri sources removed (apps/desktop/src-tauri).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
byGalax
2026-05-06 23:35:01 +02:00
parent 72d02e385f
commit 825160ee46
504 changed files with 14217 additions and 14366 deletions
+35 -1
View File
@@ -2,7 +2,7 @@
// binary assets needed. Intentionally short + low-volume — these fire
// multiple times per call and shouldn't feel intrusive.
type Sfx = 'join' | 'leave' | 'end';
type Sfx = 'join' | 'leave' | 'end' | 'mute' | 'unmute' | 'deafen' | 'undeafen';
let ctx: AudioContext | null = null;
@@ -59,6 +59,28 @@ export async function playSfx(kind: Sfx): Promise<void> {
beep(440, 0.18, 0, 0.14); // A4
beep(293.66, 0.26, 0.14, 0.14); // D4
break;
case 'mute':
// Discord-style: short downward blip when mic goes silent. Quick, low
// volume so it doesn't fight whatever the user is listening to.
beep(880, 0.06, 0, 0.1); // A5
beep(660, 0.08, 0.04, 0.1); // E5
break;
case 'unmute':
// Mirror: upward blip when mic comes back.
beep(660, 0.06, 0, 0.1);
beep(880, 0.08, 0.04, 0.1);
break;
case 'deafen':
// Lower + slightly longer than mute — Discord uses a deeper tone for
// deafen so the user can tell the two states apart without looking.
beep(660, 0.07, 0, 0.1);
beep(392, 0.12, 0.05, 0.1); // G4
break;
case 'undeafen':
// Mirror of deafen: low → mid.
beep(392, 0.07, 0, 0.1);
beep(660, 0.12, 0.05, 0.1);
break;
}
}
@@ -71,3 +93,15 @@ export function playLeaveBeep(): Promise<void> {
export function playEndBeep(): Promise<void> {
return playSfx('end');
}
export function playMuteBeep(): Promise<void> {
return playSfx('mute');
}
export function playUnmuteBeep(): Promise<void> {
return playSfx('unmute');
}
export function playDeafenBeep(): Promise<void> {
return playSfx('deafen');
}
export function playUndeafenBeep(): Promise<void> {
return playSfx('undeafen');
}