Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6997f1da | ||
|
|
31d315ed8f | ||
|
|
2b1301ea0b |
@@ -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.29</Version>
|
<Version>1.6.1.30</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>
|
||||||
|
|
||||||
|
|||||||
@@ -2303,9 +2303,6 @@ const SlideshowManager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
currentSlide.classList.add("active");
|
currentSlide.classList.add("active");
|
||||||
// currentSlide.removeAttribute("inert");
|
|
||||||
// currentSlide.setAttribute("tabindex", "0");
|
|
||||||
|
|
||||||
// // Update Play/Pause Button State if it was paused
|
// // Update Play/Pause Button State if it was paused
|
||||||
// if (STATE.slideshow.isPaused) {
|
// if (STATE.slideshow.isPaused) {
|
||||||
// STATE.slideshow.isPaused = false;
|
// STATE.slideshow.isPaused = false;
|
||||||
@@ -2320,20 +2317,13 @@ const SlideshowManager = {
|
|||||||
|
|
||||||
// Manage Video Playback: Stop others, Play current
|
// Manage Video Playback: Stop others, Play current
|
||||||
|
|
||||||
// 1. Pause and mute all other YouTube players
|
// 1. Stop all other YouTube players
|
||||||
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) {
|
if (p && typeof p.pauseVideo === 'function') {
|
||||||
try {
|
|
||||||
if (typeof p.pauseVideo === 'function') {
|
|
||||||
p.pauseVideo();
|
p.pauseVideo();
|
||||||
if (typeof p.mute === 'function') {
|
|
||||||
p.mute();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) { console.warn("Error pausing player", id, e); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -2343,13 +2333,24 @@ const SlideshowManager = {
|
|||||||
document.querySelectorAll('video').forEach(video => {
|
document.querySelectorAll('video').forEach(video => {
|
||||||
if (!video.closest(`.slide[data-item-id="${currentItemId}"]`)) {
|
if (!video.closest(`.slide[data-item-id="${currentItemId}"]`)) {
|
||||||
video.pause();
|
video.pause();
|
||||||
video.muted = true;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 3. Play and Reset current video
|
// 3. Play and Reset current video
|
||||||
const videoBackdrop = currentSlide.querySelector('.video-backdrop');
|
const videoBackdrop = currentSlide.querySelector('.video-backdrop');
|
||||||
|
|
||||||
|
// Auto-unpause when a video slide becomes active
|
||||||
|
if (videoBackdrop && STATE.slideshow.isPaused) {
|
||||||
|
STATE.slideshow.isPaused = false;
|
||||||
|
const pauseButton = document.querySelector('.pause-button');
|
||||||
|
if (pauseButton) {
|
||||||
|
pauseButton.innerHTML = '<i class="material-icons">pause</i>';
|
||||||
|
const pauseLabel = LocalizationUtils.getLocalizedString('ButtonPause', 'Pause');
|
||||||
|
pauseButton.setAttribute("aria-label", pauseLabel);
|
||||||
|
pauseButton.setAttribute("title", pauseLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update mute button visibility
|
// Update mute button visibility
|
||||||
const muteButton = document.querySelector('.mute-button');
|
const muteButton = document.querySelector('.mute-button');
|
||||||
if (muteButton) {
|
if (muteButton) {
|
||||||
@@ -2379,28 +2380,12 @@ const SlideshowManager = {
|
|||||||
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
|
||||||
const player = STATE.slideshow.videoPlayers[currentItemId];
|
const player = STATE.slideshow.videoPlayers[currentItemId];
|
||||||
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
||||||
// If same video is already loaded, just seek and play (much faster)
|
// Use loadVideoById to enforce start and end times
|
||||||
let isAlreadyLoaded = false;
|
|
||||||
if (typeof player.getVideoData === 'function') {
|
|
||||||
try {
|
|
||||||
const data = player.getVideoData();
|
|
||||||
if (data && data.video_id === player._videoId) {
|
|
||||||
isAlreadyLoaded = true;
|
|
||||||
}
|
|
||||||
} catch (e) { /* player not fully ready */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isAlreadyLoaded) {
|
|
||||||
player.seekTo(player._startTime || 0);
|
|
||||||
player.playVideo();
|
|
||||||
} else {
|
|
||||||
// Full load needed (first time or different video)
|
|
||||||
player.loadVideoById({
|
player.loadVideoById({
|
||||||
videoId: player._videoId,
|
videoId: player._videoId,
|
||||||
startSeconds: player._startTime || 0,
|
startSeconds: player._startTime || 0,
|
||||||
endSeconds: player._endTime
|
endSeconds: player._endTime
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (STATE.slideshow.isMuted) {
|
if (STATE.slideshow.isMuted) {
|
||||||
player.mute();
|
player.mute();
|
||||||
|
|||||||
@@ -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.29",
|
"version": "1.6.1.30",
|
||||||
"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.29/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.30/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "6bdae85c590e90948a79984b56f93fa0",
|
"checksum": "429d556a12eed8530e6c5d0cf28e55f1",
|
||||||
"timestamp": "2026-02-14T15:04:20Z"
|
"timestamp": "2026-02-14T15:32:46Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.0.2",
|
"version": "1.6.0.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user