Added track title to music player

This commit is contained in:
gballan1 2016-11-29 12:10:41 -05:00
parent 6f879004fc
commit 2737a86d9e
3 changed files with 5 additions and 0 deletions

View File

@ -35,6 +35,7 @@
<!-- right album stuff -->
<div class="col-sm-7 col-xs-12">
<article id="music-player-card" class="card">
<h4 id="track-title">{{ songs[0].title }}</h4>
<audio id="music-player" controls>
<source src="{{ songs[0].audio_file }}.ogg" type="audio/ogg" />
<source src="{{ songs[0].audio_file }}.mp3" type="audio/mpeg" />

View File

@ -34,6 +34,7 @@
<!-- music player -->
<article id="music-player-card" class="card">
<h4 id="track-title">{{ songs[0].title }}</h4>
<audio id="music-player" controls>
<source src="{{ songs[0].audio_file }}.ogg" type="audio/ogg" />
<source src="{{ songs[0].audio_file }}.mp3" type="audio/mpeg" />

View File

@ -139,6 +139,9 @@ function changeAudioSources(trackElem, autoplay) {
}
});
// change track title
$('#track-title').text(trackElem.data('title'));
// reload music player
player.load();