mulitmedia pass, downloads

This commit is contained in:
2026-02-06 00:00:15 -05:00
parent 42a1ddf458
commit 0e4f47323f
29 changed files with 1195 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
# 01. Fix volume and speed controls in audio backends
# 01. Fix volume and speed controls in audio backends [x]
meta:
id: audio-playback-fix-01

View File

@@ -1,4 +1,4 @@
# 02. Add multimedia key detection and handling
# 02. Add multimedia key detection and handling [x]
meta:
id: audio-playback-fix-02

View File

@@ -1,4 +1,4 @@
# 03. Implement platform-specific media stream integration
# 03. Implement platform-specific media stream integration [x]
meta:
id: audio-playback-fix-03

View File

@@ -1,4 +1,4 @@
# 04. Add media key listeners to audio hook
# 04. Add media key listeners to audio hook [x]
meta:
id: audio-playback-fix-04

View File

@@ -1,4 +1,4 @@
# 05. Test multimedia controls across platforms
# 05. Test multimedia controls across platforms [x]
meta:
id: audio-playback-fix-05
@@ -76,3 +76,63 @@ notes:
- Consider using test doubles for platform-specific APIs
- Document any platform-specific issues or limitations found
- Reference: Test patterns from existing test files in src/utils/
## Implementation Notes (Completed)
### Manual Validation Steps
1. **Volume controls (all backends)**
- Launch app, load an episode, press Up/Down arrows on Player tab
- Volume indicator in PlaybackControls should update (0.00 - 1.00)
- Audio output volume should change audibly
- Test on non-Player tabs: Up/Down should still adjust volume via global media keys
2. **Speed controls (mpv, afplay)**
- Press `S` to cycle speed: 1.0 -> 1.25 -> 1.5 -> 1.75 -> 2.0 -> 0.5
- Speed indicator should update in PlaybackControls
- Audible pitch/speed change on mpv and afplay
- ffplay: speed changes require track restart (documented limitation)
3. **Seek controls**
- Press Left/Right arrows to seek -10s / +10s
- Position indicator should update
- Works on Player tab (local) and other tabs (global media keys)
4. **Global media keys (non-Player tabs)**
- Navigate to Feed, Shows, or Discover tab
- Start playing an episode from Player tab first
- Switch to another tab
- Press Space to toggle play/pause
- Press Up/Down to adjust volume
- Press Left/Right to seek
- Press S to cycle speed
5. **Platform media integration (macOS)**
- Install `nowplaying-cli`: `brew install nowplaying-cli`
- Track info should appear in macOS Now Playing widget
- If `nowplaying-cli` is not installed, graceful no-op (no errors)
### Platform Limitations
| Backend | Volume | Speed | Seek | Notes |
|---------|--------|-------|------|-------|
| **mpv** | Runtime (IPC) | Runtime (IPC) | Runtime (IPC) | Best support, uses Unix socket |
| **afplay** | Restart required | Restart required | Not supported | Process restarts with new args |
| **ffplay** | Restart required | Not supported | Not supported | No runtime speed flag |
| **system** | Depends on OS | Depends on OS | Depends on OS | Uses `open`/`xdg-open` |
| **noop** | No-op | No-op | No-op | Silent fallback |
### Media Registry Platform Support
| Platform | Integration | Status |
|----------|------------|--------|
| **macOS** | `nowplaying-cli` | Works if binary installed |
| **Linux** | MPRIS D-Bus | Stub (no-op), upgradable |
| **Windows** | None | No-op stub |
### Key Architecture Decisions
- Global media keys use event bus (`media.*` events) for decoupling
- `useMultimediaKeys` hook is called once in App.tsx
- Guards prevent double-handling when Player tab is focused (Player.tsx handles locally)
- Guards prevent interference when text input is focused
- MediaRegistry is a singleton, fire-and-forget, never throws

View File

@@ -5,11 +5,11 @@ Objective: Fix volume and speed controls and add multimedia key support with pla
Status legend: [ ] todo, [~] in-progress, [x] done
Tasks
- [ ] 01 — Fix volume and speed controls in audio backends → `01-fix-volume-speed-controls.md`
- [ ] 02 — Add multimedia key detection and handling → `02-add-multimedia-key-detection.md`
- [ ] 03 — Implement platform-specific media stream integration → `03-implement-platform-media-integration.md`
- [ ] 04 — Add media key listeners to audio hook → `04-add-media-key-listeners.md`
- [ ] 05 — Test multimedia controls across platforms → `05-test-multimedia-controls.md`
- [x] 01 — Fix volume and speed controls in audio backends → `01-fix-volume-speed-controls.md`
- [x] 02 — Add multimedia key detection and handling → `02-add-multimedia-key-detection.md`
- [x] 03 — Implement platform-specific media stream integration → `03-implement-platform-media-integration.md`
- [x] 04 — Add media key listeners to audio hook → `04-add-media-key-listeners.md`
- [x] 05 — Test multimedia controls across platforms → `05-test-multimedia-controls.md`
Dependencies
- 01 depends on 02

View File

@@ -1,4 +1,4 @@
# 20. Debug Category Filter Implementation
# 20. Debug Category Filter Implementation [x]
meta:
id: discover-categories-fix-20

View File

@@ -1,4 +1,4 @@
# 21. Fix Category State Synchronization
# 21. Fix Category State Synchronization [x]
meta:
id: discover-categories-fix-21

View File

@@ -1,4 +1,4 @@
# 22. Fix Category Keyboard Navigation
# 22. Fix Category Keyboard Navigation [x]
meta:
id: discover-categories-fix-22

View File

@@ -1,4 +1,4 @@
# 14. Define Download Storage Structure
# 14. Define Download Storage Structure [x]
meta:
id: episode-downloads-14

View File

@@ -1,4 +1,4 @@
# 15. Create Episode Download Utility
# 15. Create Episode Download Utility [x]
meta:
id: episode-downloads-15

View File

@@ -1,4 +1,4 @@
# 16. Implement Download Progress Tracking
# 16. Implement Download Progress Tracking [x]
meta:
id: episode-downloads-16

View File

@@ -1,4 +1,4 @@
# 17. Add Download Status in Episode List
# 17. Add Download Status in Episode List [x]
meta:
id: episode-downloads-17

View File

@@ -1,4 +1,4 @@
# 18. Implement Per-Feed Auto-Download Settings
# 18. Implement Per-Feed Auto-Download Settings [x]
meta:
id: episode-downloads-18

View File

@@ -1,4 +1,4 @@
# 19. Create Download Queue Management
# 19. Create Download Queue Management [x]
meta:
id: episode-downloads-19