mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
media info for now playing item in now playing bar
This commit is contained in:
parent
fadaf9785f
commit
5490394856
3 changed files with 54 additions and 9 deletions
|
@ -815,6 +815,10 @@ progress {
|
|||
position: relative;
|
||||
width: 270px;
|
||||
}
|
||||
#nowPlayingBar #mediaInfo, #nowPlayingBar #mediaInfo div {
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.mediaButton img {
|
||||
height: 28px;
|
||||
|
|
|
@ -66,6 +66,55 @@
|
|||
$('#previousTrackButton', nowPlayingBar)[0].disabled = true;
|
||||
$('#nextTrackButton', nowPlayingBar)[0].disabled = true;
|
||||
}
|
||||
|
||||
//display image and title
|
||||
var imageTags = item.ImageTags || {};
|
||||
var html = '';
|
||||
|
||||
if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
height: 30,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
}
|
||||
else if (imageTags.Thumb) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
height: 30,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
}
|
||||
else if (imageTags.Primary) {
|
||||
|
||||
url = ApiClient.getImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
height: 30,
|
||||
tag: item.ImageTags.Primary
|
||||
});
|
||||
}else {
|
||||
url = "css/images/items/detail/video.png";
|
||||
}
|
||||
|
||||
var name = item.Name;
|
||||
var series_name = '';
|
||||
|
||||
if (item.IndexNumber != null) {
|
||||
name = item.IndexNumber + " - " + name;
|
||||
}
|
||||
if (item.ParentIndexNumber != null) {
|
||||
name = item.ParentIndexNumber + "." + name;
|
||||
}
|
||||
if (item.SeriesName || item.Album || item.ProductionYear) {
|
||||
series_name = item.SeriesName || item.Album || item.ProductionYear;
|
||||
}
|
||||
|
||||
html += "<div><img class='clientNowPlayingImage' alt='' title='' src='" + url + "' style='height:30px;display:inline-block;' /></div>";
|
||||
html += '<div>'+name+'<br/>'+series_name+'</div>';
|
||||
|
||||
$('#mediaInfo', nowPlayingBar).html(html);
|
||||
},
|
||||
|
||||
playAudio: function (items, params) {
|
||||
|
|
|
@ -1152,24 +1152,16 @@ var ApiClient = MediaBrowser.ApiClient.create("Dashboard");
|
|||
$(function () {
|
||||
|
||||
var footerHtml = '<div id="footer" class="ui-bar-a">';
|
||||
|
||||
footerHtml += '<div id="nowPlayingBar" style="display:none;">';
|
||||
|
||||
footerHtml += '<button id="previousTrackButton" class="imageButton mediaButton" title="Previous Track" type="button"><img src="css/images/media/previoustrack.png" /></button>';
|
||||
|
||||
footerHtml += '<button id="stopButton" class="imageButton mediaButton" title="Stop" type="button" onclick="MediaPlayer.stop();"><img src="css/images/media/stop.png" /></button>';
|
||||
|
||||
footerHtml += '<button id="nextTrackButton" class="imageButton mediaButton" title="Next Track" type="button"><img src="css/images/media/nexttrack.png" /></button>';
|
||||
|
||||
footerHtml += '<div id="mediaElement"></div>';
|
||||
|
||||
footerHtml += '<div id="mediaInfo"></div>';
|
||||
footerHtml += '</div>';
|
||||
|
||||
footerHtml += '<div id="footerNotifications"></div>';
|
||||
|
||||
footerHtml += '</div>';
|
||||
|
||||
|
||||
$(document.body).append(footerHtml);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue