Compare commits

..

3 Commits

Author SHA1 Message Date
CodeDevMLH
ad2e761bbd Update manifest.json for release v1.6.1.32 [skip ci] 2026-02-14 15:57:28 +00:00
CodeDevMLH
85f90e8fbb Bump version to 1.6.1.32
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-02-14 16:56:39 +01:00
CodeDevMLH
9f5f607168 Refactor video playback handling for active slides and improve mute functionality 2026-02-14 16:56:23 +01:00
3 changed files with 31 additions and 27 deletions

View File

@@ -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.6.1.31</Version> <Version>1.6.1.32</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>

View File

@@ -1807,40 +1807,36 @@ const SlideCreator = {
style: "object-fit: cover; object-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none;" style: "object-fit: cover; object-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none;"
}; };
if (STATE.slideshow.isMuted) { videoAttributes.muted = "";
videoAttributes.muted = "";
}
backdrop = SlideUtils.createElement("video", videoAttributes); backdrop = SlideUtils.createElement("video", videoAttributes);
backdrop.volume = 0.4;
if (!STATE.slideshow.isMuted) {
backdrop.volume = 0.4;
}
STATE.slideshow.videoPlayers[itemId] = backdrop; STATE.slideshow.videoPlayers[itemId] = backdrop;
backdrop.addEventListener('play', () => { backdrop.addEventListener('play', (event) => {
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
// backdrop.addEventListener('play', (event) => { if (!slide || !slide.classList.contains('active')) {
// const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`); console.log(`Local video ${itemId} started playing but slide is not active, pausing.`);
event.target.pause();
// if (!slide || !slide.classList.contains('active')) { event.target.currentTime = 0;
// console.log(`Local video ${itemId} started playing but is not active, pausing.`); return;
// event.target.pause(); }
// event.target.currentTime = 0;
// return;
// }
if (CONFIG.waitForTrailerToEnd && STATE.slideshow.slideInterval) { if (CONFIG.waitForTrailerToEnd && STATE.slideshow.slideInterval) {
STATE.slideshow.slideInterval.stop(); STATE.slideshow.slideInterval.stop();
} }
}); });
backdrop.addEventListener('ended', () => { backdrop.addEventListener('ended', () => {
SlideshowManager.nextSlide(); const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
if (slide && slide.classList.contains('active')) {
SlideshowManager.nextSlide();
}
}); });
backdrop.addEventListener('error', () => { backdrop.addEventListener('error', () => {
if (CONFIG.waitForTrailerToEnd) { const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
if (CONFIG.waitForTrailerToEnd && slide && slide.classList.contains('active')) {
SlideshowManager.nextSlide(); SlideshowManager.nextSlide();
} }
}); });
@@ -2314,14 +2310,22 @@ const SlideshowManager = {
// Manage Video Playback: Stop others, Play current // Manage Video Playback: Stop others, Play current
// 1. Stop all other YouTube players // 1. Stop all other YouTube players and local video elements
if (STATE.slideshow.videoPlayers) { if (STATE.slideshow.videoPlayers) {
Object.keys(STATE.slideshow.videoPlayers).forEach(id => { Object.keys(STATE.slideshow.videoPlayers).forEach(id => {
if (id !== currentItemId) { if (id !== currentItemId) {
const p = STATE.slideshow.videoPlayers[id]; const p = STATE.slideshow.videoPlayers[id];
if (p && typeof p.pauseVideo === 'function') { if (!p) return;
// YouTube player
if (typeof p.pauseVideo === 'function') {
p.pauseVideo(); p.pauseVideo();
} }
// HTML5 <video> element (local trailers)
if (p instanceof HTMLVideoElement) {
p.pause();
p.muted = true;
p.currentTime = 0;
}
} }
}); });
} }

View File

@@ -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.6.1.31", "version": "1.6.1.32",
"changelog": "- fix tv mode issue\n- refactor video playback management", "changelog": "- fix tv mode issue\n- refactor video playback management",
"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.6.1.31/Jellyfin.Plugin.MediaBarEnhanced.zip", "sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.32/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "dae8cf5bdc19cedf50724fdebc0fe86d", "checksum": "8d12099d8b1972412b6c300eeddc0c1b",
"timestamp": "2026-02-14T15:41:37Z" "timestamp": "2026-02-14T15:57:28Z"
}, },
{ {
"version": "1.6.0.2", "version": "1.6.0.2",