feat: playback overlay with seek bar, auto-hide and double-tap skip (v0.3.4)

New PlaybackOverlay component replaces the old hint bar in ChannelScreen.
The overlay sits as a fullscreen layer above the app during playback:

- Auto-hides after 5 s while playing; stays visible when paused;
  reactivated by any gamepad key press or mouse movement
- Center play/pause button, channel avatar, title, LIVE badge
- VOD: seek bar with pointer-capture scrubbing, current time / total duration
- Live: pulsing LIVE indicator instead of seek bar
- Double-tap zones left/right (±10 s) with animated skip feedback
- Gamepad hints in the top bar
- New icons: PlayIcon, PauseIcon, StopIcon in Icons.tsx
- New IPC channel `playback:time-update` (~1 Hz) pushes absolute playback
  position from main process to renderer; adds PlaybackTimeUpdate type
  and onTimeUpdate bridge in preload + t4sd.d.ts
- PlaybackEvent extended with durationSeconds and isLive fields
This commit is contained in:
Andre
2026-05-07 17:24:48 +02:00
parent 87eb37c60c
commit cde5fec9ff
10 changed files with 737 additions and 35 deletions
+10 -2
View File
@@ -2,7 +2,7 @@ import { app, BrowserWindow, ipcMain } from 'electron'
import type { AuthEvent, AuthService } from '../auth/authService'
import type { HelixClient } from '../twitch/helixClient'
import type { PlaybackService } from '../playback/playbackService'
import type { PlaybackEvent } from '../playback/types'
import type { PlaybackEvent, PlaybackTimeUpdate } from '../playback/types'
import { getProgressMap } from '../store/historyRepo'
export const IPC = {
@@ -35,7 +35,9 @@ export const IPC = {
playbackSetLoggingEnabled: 'playback:set-logging-enabled',
playbackGetLogPath: 'playback:get-log-path',
/** main → renderer */
playbackEvent: 'playback:event'
playbackEvent: 'playback:event',
/** main → renderer: ~1 Hz position updates during VOD playback */
playbackTimeUpdate: 'playback:time-update'
} as const
export function registerIpcHandlers(
@@ -122,4 +124,10 @@ export function registerIpcHandlers(
}
}
})
playback.on('playback-time-update', (data: PlaybackTimeUpdate) => {
for (const win of BrowserWindow.getAllWindows()) {
win.webContents.send(IPC.playbackTimeUpdate, data)
}
})
}