Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14a5075e22 | ||
|
|
accb316a81 | ||
|
|
51c5cdf5bf | ||
|
|
306eff757b | ||
|
|
b8f28a5735 | ||
|
|
0932d9611d | ||
|
|
5e616db0ae | ||
|
|
538b0f2110 | ||
|
|
e717c07c54 | ||
|
|
0fa2d01ca3 | ||
|
|
5299b2a9d5 | ||
|
|
4f244988b9 | ||
|
|
5635a8f05e | ||
|
|
c901da4b0c | ||
|
|
c45cd0281f | ||
|
|
0c3e74829a | ||
|
|
e6b769f099 | ||
|
|
77371f7b98 | ||
|
|
988b800b6d | ||
|
|
4c6514ba9f |
@@ -36,7 +36,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
|
|||||||
public bool EnableSeasonalContent { get; set; } = false;
|
public bool EnableSeasonalContent { get; set; } = false;
|
||||||
public bool IsEnabled { get; set; } = true;
|
public bool IsEnabled { get; set; } = true;
|
||||||
public bool EnableClientSideSettings { get; set; } = false;
|
public bool EnableClientSideSettings { get; set; } = false;
|
||||||
public bool EnableUpstreamTrailerLayout { get; set; } = false;
|
|
||||||
public string SortBy { get; set; } = "Random";
|
public string SortBy { get; set; } = "Random";
|
||||||
public string SortOrder { get; set; } = "Ascending";
|
public string SortOrder { get; set; } = "Ascending";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,14 +73,6 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription">Delay slide transition until trailer finishes.</div>
|
<div class="fieldDescription">Delay slide transition until trailer finishes.</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="UpstreamTrailerLayoutContainer" class="checkboxContainer checkboxContainer-withDescription">
|
|
||||||
<label>
|
|
||||||
<input is="emby-checkbox" type="checkbox" id="EnableUpstreamTrailerLayout"
|
|
||||||
name="EnableUpstreamTrailerLayout" />
|
|
||||||
<span>Enable Upstream Trailer Layout</span>
|
|
||||||
</label>
|
|
||||||
<div class="fieldDescription">Use the upstream (original) layout for trailers. This renders the video inside a container overlaying the backdrop, instead of replacing it to support full-width video.</div>
|
|
||||||
</div>
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label>
|
<label>
|
||||||
<input is="emby-checkbox" type="checkbox" id="EnableMobileVideo"
|
<input is="emby-checkbox" type="checkbox" id="EnableMobileVideo"
|
||||||
@@ -414,7 +406,7 @@
|
|||||||
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
|
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
|
||||||
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
|
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
|
||||||
'EnableSeasonalContent', 'EnableClientSideSettings', 'SortBy', 'SortOrder',
|
'EnableSeasonalContent', 'EnableClientSideSettings', 'SortBy', 'SortOrder',
|
||||||
'PreferLocalTrailers', 'EnableUpstreamTrailerLayout'
|
'PreferLocalTrailers'
|
||||||
];
|
];
|
||||||
|
|
||||||
keys.forEach(function (key) {
|
keys.forEach(function (key) {
|
||||||
@@ -451,15 +443,12 @@
|
|||||||
// Handle Prefer Local Trailers visibility
|
// Handle Prefer Local Trailers visibility
|
||||||
var enableVideoBackdropCheckbox = page.querySelector('#EnableVideoBackdrop');
|
var enableVideoBackdropCheckbox = page.querySelector('#EnableVideoBackdrop');
|
||||||
var preferLocalContainer = page.querySelector('#PreferLocalTrailersContainer');
|
var preferLocalContainer = page.querySelector('#PreferLocalTrailersContainer');
|
||||||
var upstreamLayoutContainer = page.querySelector('#UpstreamTrailerLayoutContainer');
|
|
||||||
|
|
||||||
function updatePreferLocalVisibility() {
|
function updatePreferLocalVisibility() {
|
||||||
if (enableVideoBackdropCheckbox && enableVideoBackdropCheckbox.checked) {
|
if (enableVideoBackdropCheckbox && enableVideoBackdropCheckbox.checked) {
|
||||||
if (preferLocalContainer) preferLocalContainer.style.display = 'block';
|
if (preferLocalContainer) preferLocalContainer.style.display = 'block';
|
||||||
if (upstreamLayoutContainer) upstreamLayoutContainer.style.display = 'block';
|
|
||||||
} else {
|
} else {
|
||||||
if (preferLocalContainer) preferLocalContainer.style.display = 'none';
|
if (preferLocalContainer) preferLocalContainer.style.display = 'none';
|
||||||
if (upstreamLayoutContainer) upstreamLayoutContainer.style.display = 'none';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,7 +473,7 @@
|
|||||||
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
|
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
|
||||||
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
|
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
|
||||||
'EnableSeasonalContent', 'EnableClientSideSettings', 'SortBy', 'SortOrder',
|
'EnableSeasonalContent', 'EnableClientSideSettings', 'SortBy', 'SortOrder',
|
||||||
'PreferLocalTrailers', 'EnableUpstreamTrailerLayout'
|
'PreferLocalTrailers'
|
||||||
];
|
];
|
||||||
|
|
||||||
keys.forEach(function (key) {
|
keys.forEach(function (key) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<Authors>CodeDevMLH</Authors>
|
||||||
<Version>1.5.0.12</Version>
|
<Version>1.5.0.21</Version>
|
||||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
.homeSectionsContainer {
|
.homeSectionsContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 65vh;
|
margin-top: 65vh;
|
||||||
z-index: 6;
|
z-index: 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,49 +343,6 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-container {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 100%;
|
|
||||||
width: 0;
|
|
||||||
z-index: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
transition:
|
|
||||||
width 0.5s ease-in-out,
|
|
||||||
opacity 0.5s ease-in-out;
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
mask-image:
|
|
||||||
linear-gradient(to right, transparent 10%, black 30%),
|
|
||||||
linear-gradient(to top, transparent 2%, rgba(0, 0, 0, 0.5) 6%, black 8%);
|
|
||||||
|
|
||||||
-webkit-mask-image:
|
|
||||||
linear-gradient(to right, transparent 10%, black 30%),
|
|
||||||
linear-gradient(to top, transparent 2%, rgba(0, 0, 0, 0.5) 6%, black 8%);
|
|
||||||
|
|
||||||
mask-composite: intersect;
|
|
||||||
-webkit-mask-composite: source-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-container.active {
|
|
||||||
opacity: 1;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-player {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ensure video inside container fills it */
|
|
||||||
.video-container iframe,
|
|
||||||
.video-container video {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.backdrop-container {
|
.backdrop-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0%;
|
top: 0%;
|
||||||
@@ -422,10 +379,6 @@
|
|||||||
object-position: center 20%;
|
object-position: center 20%;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
transition:
|
|
||||||
width 0.5s ease-in-out,
|
|
||||||
mask-image 0.5s ease-in-out,
|
|
||||||
-webkit-mask-image 0.5s ease-in-out;
|
|
||||||
mask-image: linear-gradient(to top,
|
mask-image: linear-gradient(to top,
|
||||||
#fff0 2%,
|
#fff0 2%,
|
||||||
rgb(0 0 0 / 0.5) 6%,
|
rgb(0 0 0 / 0.5) 6%,
|
||||||
@@ -436,20 +389,6 @@
|
|||||||
#000000 8%);
|
#000000 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.backdrop.with-video {
|
|
||||||
width: 100%;
|
|
||||||
mask-image:
|
|
||||||
linear-gradient(to top, #fff0 2%, rgb(0 0 0 / 0.5) 6%, #000000 8%),
|
|
||||||
linear-gradient(to right, black 30%, transparent 85%);
|
|
||||||
|
|
||||||
-webkit-mask-image:
|
|
||||||
linear-gradient(to top, #fff0 2%, rgb(0 0 0 / 0.5) 6%, #000000 8%),
|
|
||||||
linear-gradient(to right, black 30%, transparent 85%);
|
|
||||||
|
|
||||||
mask-composite: source-in;
|
|
||||||
-webkit-mask-composite: source-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
.backdrop-overlay {
|
.backdrop-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ const CONFIG = {
|
|||||||
customMediaIds: "",
|
customMediaIds: "",
|
||||||
enableLoadingScreen: true,
|
enableLoadingScreen: true,
|
||||||
enableClientSideSettings: false,
|
enableClientSideSettings: false,
|
||||||
enableUpstreamTrailerLayout: false,
|
|
||||||
sortBy: "Random",
|
sortBy: "Random",
|
||||||
sortOrder: "Ascending",
|
sortOrder: "Ascending",
|
||||||
};
|
};
|
||||||
@@ -606,7 +605,10 @@ const SlideUtils = {
|
|||||||
getOrCreateSlidesContainer() {
|
getOrCreateSlidesContainer() {
|
||||||
let container = document.getElementById("slides-container");
|
let container = document.getElementById("slides-container");
|
||||||
if (!container) {
|
if (!container) {
|
||||||
container = this.createElement("div", { id: "slides-container" });
|
container = this.createElement("div", {
|
||||||
|
id: "slides-container",
|
||||||
|
className: "noautofocus"
|
||||||
|
});
|
||||||
document.body.appendChild(container);
|
document.body.appendChild(container);
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
@@ -1538,7 +1540,6 @@ const SlideCreator = {
|
|||||||
|
|
||||||
let backdrop;
|
let backdrop;
|
||||||
let isVideo = false;
|
let isVideo = false;
|
||||||
let hasUpstreamVideo = false;
|
|
||||||
let trailerUrl = null;
|
let trailerUrl = null;
|
||||||
|
|
||||||
// 1. Check for Remote/Local Trailers
|
// 1. Check for Remote/Local Trailers
|
||||||
@@ -1586,31 +1587,13 @@ const SlideCreator = {
|
|||||||
|
|
||||||
if (isYoutube && videoId) {
|
if (isYoutube && videoId) {
|
||||||
isVideo = true;
|
isVideo = true;
|
||||||
|
// Create container for YouTube API
|
||||||
const videoClass = CONFIG.fullWidthVideo ? "video-backdrop-full" : "video-backdrop-default";
|
const videoClass = CONFIG.fullWidthVideo ? "video-backdrop-full" : "video-backdrop-default";
|
||||||
|
|
||||||
if (CONFIG.enableUpstreamTrailerLayout) {
|
backdrop = SlideUtils.createElement("div", {
|
||||||
// UPSTREAM LAYOUT: Wrapper Container
|
className: `backdrop video-backdrop ${videoClass}`,
|
||||||
const videoContainer = SlideUtils.createElement("div", {
|
id: `youtube-player-${itemId}`
|
||||||
className: "video-container",
|
});
|
||||||
id: `video-container-${itemId}`
|
|
||||||
});
|
|
||||||
|
|
||||||
const playerDiv = SlideUtils.createElement("div", {
|
|
||||||
id: `youtube-player-${itemId}`
|
|
||||||
});
|
|
||||||
|
|
||||||
videoContainer.appendChild(playerDiv);
|
|
||||||
slide.appendChild(videoContainer); // Append container first
|
|
||||||
|
|
||||||
isVideo = false;
|
|
||||||
hasUpstreamVideo = true;
|
|
||||||
} else {
|
|
||||||
// ENHANCED LAYOUT: Direct Backdrop Replacement
|
|
||||||
backdrop = SlideUtils.createElement("div", {
|
|
||||||
className: `backdrop video-backdrop ${videoClass}`,
|
|
||||||
id: `youtube-player-${itemId}`
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize YouTube Player
|
// Initialize YouTube Player
|
||||||
SlideUtils.loadYouTubeIframeAPI().then(() => {
|
SlideUtils.loadYouTubeIframeAPI().then(() => {
|
||||||
@@ -1696,15 +1679,6 @@ const SlideCreator = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'onStateChange': (event) => {
|
'onStateChange': (event) => {
|
||||||
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
|
|
||||||
const videoContainer = slide ? slide.querySelector('.video-container') : null;
|
|
||||||
|
|
||||||
if (event.data === YT.PlayerState.PLAYING) {
|
|
||||||
if (videoContainer) videoContainer.classList.add('active');
|
|
||||||
} else {
|
|
||||||
if (videoContainer) videoContainer.classList.remove('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.data === YT.PlayerState.ENDED) {
|
if (event.data === YT.PlayerState.ENDED) {
|
||||||
if (CONFIG.waitForTrailerToEnd) {
|
if (CONFIG.waitForTrailerToEnd) {
|
||||||
SlideshowManager.nextSlide();
|
SlideshowManager.nextSlide();
|
||||||
@@ -1766,30 +1740,12 @@ const SlideCreator = {
|
|||||||
SlideshowManager.nextSlide();
|
SlideshowManager.nextSlide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (CONFIG.enableUpstreamTrailerLayout) {
|
|
||||||
// Wrap in container
|
|
||||||
const videoContainer = SlideUtils.createElement("div", {
|
|
||||||
className: "video-container",
|
|
||||||
id: `video-container-${itemId}`
|
|
||||||
});
|
|
||||||
backdrop.style.position = "";
|
|
||||||
videoContainer.appendChild(backdrop);
|
|
||||||
slide.appendChild(videoContainer);
|
|
||||||
|
|
||||||
isVideo = false;
|
|
||||||
hasUpstreamVideo = true;
|
|
||||||
|
|
||||||
backdrop.addEventListener('play', () => videoContainer.classList.add('active'));
|
|
||||||
backdrop.addEventListener('pause', () => videoContainer.classList.remove('active'));
|
|
||||||
backdrop.addEventListener('ended', () => videoContainer.classList.remove('active'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isVideo) {
|
if (!isVideo) {
|
||||||
backdrop = SlideUtils.createElement("img", {
|
backdrop = SlideUtils.createElement("img", {
|
||||||
className: hasUpstreamVideo ? "backdrop high-quality with-video" : "backdrop high-quality",
|
className: "backdrop high-quality",
|
||||||
src: this.buildImageUrl(item, "Backdrop", 0, serverAddress, 60),
|
src: this.buildImageUrl(item, "Backdrop", 0, serverAddress, 60),
|
||||||
alt: LocalizationUtils.getLocalizedString('Backdrop', 'Backdrop'),
|
alt: LocalizationUtils.getLocalizedString('Backdrop', 'Backdrop'),
|
||||||
loading: "eager",
|
loading: "eager",
|
||||||
@@ -2702,29 +2658,45 @@ const SlideshowManager = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const activeElement = document.activeElement;
|
||||||
|
const isSlideshowFocused = container.contains(activeElement) || activeElement === container;
|
||||||
|
|
||||||
|
const isTvMode = window.layoutManager && window.layoutManager.tv;
|
||||||
|
|
||||||
|
const isInputElement = activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA' || activeElement.isContentEditable);
|
||||||
|
|
||||||
|
if (isInputElement) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
case "ArrowRight":
|
case "ArrowRight":
|
||||||
|
if (isTvMode && !isSlideshowFocused) return;
|
||||||
SlideshowManager.nextSlide();
|
SlideshowManager.nextSlide();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "ArrowLeft":
|
case "ArrowLeft":
|
||||||
|
if (isTvMode && !isSlideshowFocused) return;
|
||||||
SlideshowManager.prevSlide();
|
SlideshowManager.prevSlide();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case " ": // Space bar
|
case " ": // Space bar
|
||||||
|
if (isTvMode && !isSlideshowFocused) return;
|
||||||
this.togglePause();
|
this.togglePause();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "m": // Mute toggle
|
case "m": // Mute toggle
|
||||||
case "M":
|
case "M":
|
||||||
|
if (isTvMode && !isSlideshowFocused) return;
|
||||||
this.toggleMute();
|
this.toggleMute();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Enter":
|
case "Enter":
|
||||||
|
if (!isSlideshowFocused) return;
|
||||||
const currentItemId = STATE.slideshow.itemIds[STATE.slideshow.currentSlideIndex];
|
const currentItemId = STATE.slideshow.itemIds[STATE.slideshow.currentSlideIndex];
|
||||||
if (currentItemId) {
|
if (currentItemId) {
|
||||||
if (window.Emby && window.Emby.Page) {
|
if (window.Emby && window.Emby.Page) {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"version": "1.5.0.12",
|
"version": "1.5.0.21",
|
||||||
"changelog": "- fix: keyboard controls in TV mode\n- Add sorting options for content\n- Update mediaBarEnhanced.js and mediaBarEnhanced.css with version 4.0.1 from original repo",
|
"changelog": "- fix: Keyboard controls in TV mode\n- Add sorting options for content\n- Update mediaBarEnhanced.js and mediaBarEnhanced.css with version 4.0.1 from original repo",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.5.0.12/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.5.0.21/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "f43d2193b1da2bd319668c73ab7a19ee",
|
"checksum": "9a28102dbd4b62abdc8ef72abd7c6574",
|
||||||
"timestamp": "2026-02-09T15:10:06Z"
|
"timestamp": "2026-02-09T22:29:09Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.3.0.3",
|
"version": "1.3.0.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user