Skip to content

fix: add audio element and wire up play/pause/prev/next conttrols - #95

Open
rajkr99 wants to merge 1 commit into
KDeekshita:mainfrom
rajkr99:fix/audio-player-controls
Open

fix: add audio element and wire up play/pause/prev/next conttrols#95
rajkr99 wants to merge 1 commit into
KDeekshita:mainfrom
rajkr99:fix/audio-player-controls

Conversation

@rajkr99

@rajkr99 rajkr99 commented Jun 15, 2026

Copy link
Copy Markdown

Fixes #87

What changed

  • Added <audio id="player" preload="auto"> to templates/index.html
  • Added IDs to the three control buttons (btn-prev, btn-play, btn-next)
  • Wired up play/pause toggle with icon sync (▶ ↔ ⏸) in script.js
  • Fetches /api/songs on page load to build song list
  • Implemented prev/next navigation with wrap-around
  • Auto-advances to next song when current track ends

Testing

  • Ran cargo fmt, cargo clippy, cargo build — all passed
  • Verified button IDs match between HTML and JS

@rajkr99 rajkr99 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good

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.

[BUG] Play/Pause and player controls are non-functional — no audio element wired up

1 participant