mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix video now playing bar
This commit is contained in:
parent
cfa418fd47
commit
c2e9fb0a36
3 changed files with 22 additions and 55 deletions
|
@ -167,6 +167,10 @@
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabScenes, .tabCast {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
#videoPlayer .nowPlayingText {
|
#videoPlayer .nowPlayingText {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin: 0 0 0 1em;
|
margin: 0 0 0 1em;
|
||||||
|
|
|
@ -11,11 +11,6 @@
|
||||||
max-width: 130px;
|
max-width: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mediaButton.infoButton {
|
|
||||||
width: 34px;
|
|
||||||
height: 34px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mediaButton.active {
|
.mediaButton.active {
|
||||||
color: #52B54B;
|
color: #52B54B;
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,7 +413,24 @@
|
||||||
|
|
||||||
var elem = mediaControls.querySelector('.nowPlayingTabs');
|
var elem = mediaControls.querySelector('.nowPlayingTabs');
|
||||||
elem.innerHTML = getNowPlayingTabsHtml(item.CurrentProgram || item);
|
elem.innerHTML = getNowPlayingTabsHtml(item.CurrentProgram || item);
|
||||||
|
|
||||||
|
var tabCast = elem.querySelector('.tabCast');
|
||||||
|
if (tabCast) {
|
||||||
|
require(['peoplecardbuilder'], function (peoplecardbuilder) {
|
||||||
|
|
||||||
|
peoplecardbuilder.buildPeopleCards((item.CurrentProgram || item).People || [], {
|
||||||
|
itemsContainer: tabCast,
|
||||||
|
coverImage: true,
|
||||||
|
serverId: ApiClient.serverId(),
|
||||||
|
width: 160,
|
||||||
|
shape: 'portrait'
|
||||||
|
});
|
||||||
ImageLoader.lazyChildren(elem);
|
ImageLoader.lazyChildren(elem);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ImageLoader.lazyChildren(elem);
|
||||||
|
}
|
||||||
|
|
||||||
function onTabButtonClick() {
|
function onTabButtonClick() {
|
||||||
if (!this.classList.contains('selectedNowPlayingTabButton')) {
|
if (!this.classList.contains('selectedNowPlayingTabButton')) {
|
||||||
|
@ -540,55 +557,6 @@
|
||||||
|
|
||||||
if (item.People && item.People.length) {
|
if (item.People && item.People.length) {
|
||||||
html += '<div class="tabCast nowPlayingTab smoothScrollX hide" style="white-space:nowrap;">';
|
html += '<div class="tabCast nowPlayingTab smoothScrollX hide" style="white-space:nowrap;">';
|
||||||
html += item.People.map(function (cast) {
|
|
||||||
|
|
||||||
var personHtml = '<div class="tileItem smallPosterTileItem" style="width:300px;">';
|
|
||||||
|
|
||||||
var imgUrl;
|
|
||||||
var height = 150;
|
|
||||||
|
|
||||||
if (cast.PrimaryImageTag) {
|
|
||||||
|
|
||||||
imgUrl = ApiClient.getScaledImageUrl(cast.Id, {
|
|
||||||
height: height,
|
|
||||||
tag: cast.PrimaryImageTag,
|
|
||||||
type: "primary",
|
|
||||||
minScale: 2
|
|
||||||
});
|
|
||||||
|
|
||||||
personHtml += '<div class="tileImage lazy" data-src="' + imgUrl + '" style="height:' + height + 'px;"></div>';
|
|
||||||
} else {
|
|
||||||
|
|
||||||
imgUrl = "css/images/items/list/person.png";
|
|
||||||
personHtml += '<div class="tileImage" style="background-image:url(\'' + imgUrl + '\');height:' + height + 'px;"></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
personHtml += '<div class="tileContent">';
|
|
||||||
|
|
||||||
personHtml += '<p>' + cast.Name + '</p>';
|
|
||||||
|
|
||||||
var role = cast.Role ? Globalize.translate('ValueAsRole', cast.Role) : cast.Type;
|
|
||||||
|
|
||||||
if (role == "GuestStar") {
|
|
||||||
role = Globalize.translate('ValueGuestStar');
|
|
||||||
}
|
|
||||||
|
|
||||||
role = role || "";
|
|
||||||
|
|
||||||
var maxlength = 40;
|
|
||||||
|
|
||||||
if (role.length > maxlength) {
|
|
||||||
role = role.substring(0, maxlength - 3) + '...';
|
|
||||||
}
|
|
||||||
|
|
||||||
personHtml += '<p>' + role + '</p>';
|
|
||||||
|
|
||||||
personHtml += '</div>';
|
|
||||||
|
|
||||||
personHtml += '</div>';
|
|
||||||
return personHtml;
|
|
||||||
|
|
||||||
}).join('');
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue