added artist/album info to nowPlaying

This commit is contained in:
iou1name 2019-02-07 09:23:26 -05:00
parent 4adc62f499
commit 9f96393eaf
2 changed files with 5 additions and 2 deletions

View File

@ -72,7 +72,9 @@ function change_track(track) {
let player = document.getElementById('player');
player.load();
player.play();
document.getElementById('nowPlaying').innerHTML = track.title;
document.getElementById('nowPlayingArtist').innerHTML = track.artist;
document.getElementById('nowPlayingAlbum').innerHTML = track.album;
document.getElementById('nowPlayingTitle').innerHTML = track.title;
document.getElementById('albumCover').firstChild.src = track.coverart;
}

View File

@ -32,7 +32,8 @@
<div id="playerContainer">
<span id="albumCover"><img src=""/></span>
<span id="playerControls">
<h3 id="nowPlaying"></h3>
<h4><span id="nowPlayingArtist"></span> - <span id="nowPlayingAlbum"></span></h4>
<h3 id="nowPlayingTitle"></h3>
<audio id="player" controls>
<source id="stream" src="" type="audio/ogg">
</audio>