Skip to content

Commit

Permalink
fix: add artist name on music control
Browse files Browse the repository at this point in the history
  • Loading branch information
antheiz committed Aug 29, 2024
1 parent 04a7f2f commit a964964
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/MusicControl.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!-- Sticky Music Control -->
<div class="sticky bottom-0 inset-x-0 z-50 max-w-screen-lg mx-auto px-4 md:px-8 text-center py-2">
<div class="flex flex-col justify-between bg-white border border-neutral-300 rounded-lg py-3 px-4 md:px-8 dark:border-neutral-700 dark:bg-neutral-800">
<p id="music-control-title" class="pb-4 md:pb-2 text-base text-gray-500 dark:text-gray-400">Sau Mabu</p>
<!-- <p id="music-control-artist" class="pb-4 md:pb-2 text-sm text-gray-500 dark:text-gray-400">Artist 1</p> -->
<p id="music-control-title" class="pb-4 md:pb-2 text-base text-gray-500 dark:text-gray-400"></p>
<div class="pb-2 flex flex-col md:flex-row gap-y-2.5">
<div class="flex items-center justify-center md:justify-between gap-x-1.5">
<!-- Previous Button -->
Expand Down
2 changes: 1 addition & 1 deletion src/lib/musicPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function updateMusicInfo(song: Music, isPlaying: boolean): void {
heroSongTitle.textContent = song.title;
heroSongArtist.textContent = song.artist;
heroCoverArt.src = song.cover_art_url;
musicControlTitle.textContent = song.title;
musicControlTitle.textContent = `${song.title} - ${song.artist}`;

updatePlayState(isPlaying);

Expand Down

0 comments on commit a964964

Please sign in to comment.