Bump version to 1.5.0.0 and update changelog for mediaBarEnhanced.js and mediaBarEnhanced.css
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 56s
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 56s
This commit is contained in:
@@ -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.4.0.12</Version>
|
<Version>1.5.0.0</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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Jellyfin Slideshow by M0RPH3US v3.0.9
|
* Jellyfin Slideshow by M0RPH3US v4.0.1
|
||||||
* Modified by CodeDevMLH v1.1.0.0
|
* Modified by CodeDevMLH v1.1.0.0
|
||||||
*
|
*
|
||||||
* New features:
|
* New features:
|
||||||
@@ -81,6 +81,7 @@ const STATE = {
|
|||||||
sponsorBlockInterval: null,
|
sponsorBlockInterval: null,
|
||||||
isMuted: CONFIG.startMuted,
|
isMuted: CONFIG.startMuted,
|
||||||
customTrailerUrls: {},
|
customTrailerUrls: {},
|
||||||
|
ytPromise: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -582,23 +583,25 @@ const SlideUtils = {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
loadYouTubeIframeAPI() {
|
loadYouTubeIframeAPI() {
|
||||||
return new Promise((resolve) => {
|
if (STATE.slideshow.ytPromise) return STATE.slideshow.ytPromise;
|
||||||
|
|
||||||
|
STATE.slideshow.ytPromise = new Promise((resolve) => {
|
||||||
if (window.YT && window.YT.Player) {
|
if (window.YT && window.YT.Player) {
|
||||||
resolve();
|
resolve(window.YT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tag = document.createElement('script');
|
window.onYouTubeIframeAPIReady = () => resolve(window.YT);
|
||||||
tag.src = "https://www.youtube.com/iframe_api";
|
|
||||||
const firstScriptTag = document.getElementsByTagName('script')[0];
|
if (!document.querySelector('script[src*="youtube.com/iframe_api"]')) {
|
||||||
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
const tag = document.createElement('script');
|
||||||
|
tag.src = "https://www.youtube.com/iframe_api";
|
||||||
const previousOnYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady;
|
const firstScriptTag = document.getElementsByTagName('script')[0];
|
||||||
window.onYouTubeIframeAPIReady = () => {
|
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
||||||
if (previousOnYouTubeIframeAPIReady) previousOnYouTubeIframeAPIReady();
|
}
|
||||||
resolve();
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return STATE.slideshow.ytPromise;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3109,6 +3112,84 @@ const MediaBarEnhancedSettingsManager = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize page visibility handling to pause when tab is inactive
|
||||||
|
*/
|
||||||
|
const initPageVisibilityHandler = () => {
|
||||||
|
let wasVideoPlayingBeforeHide = false;
|
||||||
|
|
||||||
|
document.addEventListener("visibilitychange", () => {
|
||||||
|
if (document.hidden) {
|
||||||
|
console.log("Tab inactive - pausing slideshow and videos");
|
||||||
|
wasVideoPlayingBeforeHide = STATE.slideshow.isVideoPlaying;
|
||||||
|
|
||||||
|
if (STATE.slideshow.slideInterval) {
|
||||||
|
STATE.slideshow.slideInterval.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pause active video if playing
|
||||||
|
const currentItemId = STATE.slideshow.itemIds[STATE.slideshow.currentSlideIndex];
|
||||||
|
if (currentItemId) {
|
||||||
|
// YouTube
|
||||||
|
if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
||||||
|
const player = STATE.slideshow.videoPlayers[currentItemId];
|
||||||
|
if (typeof player.pauseVideo === "function") {
|
||||||
|
try {
|
||||||
|
player.pauseVideo();
|
||||||
|
STATE.slideshow.isVideoPlaying = false;
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Error pausing video on tab hide:", e);
|
||||||
|
}
|
||||||
|
} else if (player.tagName === 'VIDEO') { // HTML5 Video
|
||||||
|
player.pause();
|
||||||
|
STATE.slideshow.isVideoPlaying = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log("Tab active - resuming slideshow");
|
||||||
|
if (!STATE.slideshow.isPaused) {
|
||||||
|
const currentItemId = STATE.slideshow.itemIds[STATE.slideshow.currentSlideIndex];
|
||||||
|
|
||||||
|
if (wasVideoPlayingBeforeHide && currentItemId && STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
||||||
|
const player = STATE.slideshow.videoPlayers[currentItemId];
|
||||||
|
|
||||||
|
// YouTube
|
||||||
|
if (typeof player.playVideo === "function") {
|
||||||
|
try {
|
||||||
|
player.playVideo();
|
||||||
|
STATE.slideshow.isVideoPlaying = true;
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Error resuming video on tab show:", e);
|
||||||
|
if (STATE.slideshow.slideInterval) {
|
||||||
|
STATE.slideshow.slideInterval.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (player.tagName === 'VIDEO') { // HTML5 Video
|
||||||
|
try {
|
||||||
|
player.play().catch(e => console.warn("Error resuming HTML5 video:", e));
|
||||||
|
STATE.slideshow.isVideoPlaying = true;
|
||||||
|
} catch(e) { console.warn(e); }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// No video was playing, just restart interval
|
||||||
|
const activeSlide = document.querySelector('.slide.active');
|
||||||
|
const hasVideo = activeSlide && activeSlide.querySelector('.video-backdrop');
|
||||||
|
|
||||||
|
if (CONFIG.waitForTrailerToEnd && hasVideo) {
|
||||||
|
// Don't restart interval if waiting for trailer
|
||||||
|
} else {
|
||||||
|
if (STATE.slideshow.slideInterval) {
|
||||||
|
STATE.slideshow.slideInterval.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wasVideoPlayingBeforeHide = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the slideshow
|
* Initialize the slideshow
|
||||||
*/
|
*/
|
||||||
@@ -3222,6 +3303,8 @@ const slidesInit = async () => {
|
|||||||
|
|
||||||
SlideshowManager.initKeyboardEvents();
|
SlideshowManager.initKeyboardEvents();
|
||||||
|
|
||||||
|
initPageVisibilityHandler();
|
||||||
|
|
||||||
VisibilityObserver.init();
|
VisibilityObserver.init();
|
||||||
|
|
||||||
console.log("✅ Enhanced Jellyfin Slideshow initialized successfully");
|
console.log("✅ Enhanced Jellyfin Slideshow initialized successfully");
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
"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.4.0.12",
|
"version": "1.5.0.0",
|
||||||
"changelog": "- feat: Add client-side settings feature for selected media bar settings",
|
"changelog": "- Update mediaBarEnhanced.js and mediaBarEnhanced.css with version 3.0.9 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.4.0.12/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.5.0.0/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "26edee51b52dcee4ecf388aa376f3869",
|
"checksum": "26edee51b52dcee4ecf388aa376f3869",
|
||||||
"timestamp": "2026-02-04T18:07:40Z"
|
"timestamp": "2026-02-04T18:07:40Z"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user