Added track title to music player
This commit is contained in:
parent
6f879004fc
commit
2737a86d9e
@ -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" />
|
||||
|
@ -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" />
|
||||
|
@ -139,6 +139,9 @@ function changeAudioSources(trackElem, autoplay) {
|
||||
}
|
||||
});
|
||||
|
||||
// change track title
|
||||
$('#track-title').text(trackElem.data('title'));
|
||||
|
||||
// reload music player
|
||||
player.load();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user