Skip to content

feat: add in-app audio preview - #207

Merged
nextestudios merged 2 commits into
mainfrom
feature/60-audio-preview
Sep 27, 2026
Merged

nextestudios merged 2 commits into
mainfrom
feature/60-audio-preview

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • South on MP3/WAV/WMA/M4A/AAC/FLAC/OGG/Opus (or North → Ouvir aqui) opens an in-app audio player: South play/pause (restarts at the end), Left/Right ±10 s, LB/RB ±1 min (bounded, with a notice at the ends), Up/Down volume in 10% steps, North mute/unmute (raising the volume unmutes), East/B closes — playback stops and the file is released immediately, focus stays on the file.
  • New Core contract IMediaPlayerFactory/IMediaSession with a polled MediaStatus snapshot (state, position, duration, volume, mute, tracks/subtitles for the upcoming video player). AppController.TickMedia reads it every frame and only redraws when something visible changed (whole seconds, state, volume…).
  • WindowsMediaPlayerFactory (Infrastructure.Media): Windows MediaPlayer/Media Foundation with installed codecs only, fed via MediaSource.CreateFromStream (never a URL → no network, no UNC resolution by the player), system media transport controls disabled, clear message for unsupported codecs. MediaPreviewPolicy refuses empty files and disguised executables (MZ) off the UI thread before anything reaches the decoders.
  • Panel shows state, elapsed/total time, progress bar and volume. Render harness: new ma-audio-preview capture with a real WAV.
  • Docs: GUIDE (both, including which formats need Store codecs), CHANGELOG (both), security-model, ui-redesign row, TESTING manual checks, architecture.

Tested in CI

  • AudioPreviewJourneyTests (fake player): play/pause/seek bounds/volume/mute/restart-at-end, redraw only on visible status change, close disposes and restores focus, disguised executable refused before the player.
  • MediaPlayerIntegrationTests (real MediaPlayer, generated WAV): opens as a stream, reads the duration, pauses, seeks, and the file can be deleted right after dispose. Skips with the reason if the runner has no audio output.

Manual checks (docs/TESTING.md, "Áudio (#60)")

  • Actually hearing playback, real MP3/FLAC, missing-codec OGG message, legibility at TV distance.

Closes #60

🤖 Generated with Claude Code

nextestudios and others added 2 commits September 27, 2026 19:36
Play local audio with the Windows MediaPlayer, fed as a local stream
after refusing disguised executables. South play/pause, Left/Right and
LB/RB bounded seeks, Up/Down volume, North mute; the player state is
polled per frame and closing stops playback and releases the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nextestudios
nextestudios force-pushed the feature/60-audio-preview branch from 92f5b98 to eb29ffb Compare September 27, 2026 22:36
@nextestudios
nextestudios merged commit ff6a437 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/60-audio-preview branch September 27, 2026 22:38
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.

feat: add in-app audio preview

1 participant