Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb43d1e679 | ||
|
|
b6609d23a2 | ||
|
|
9d4cbf37d3 | ||
|
|
b5e63ef3b7 | ||
|
|
22f9906188 | ||
|
|
ae54ab41a8 |
@@ -12,7 +12,7 @@
|
||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||
<Authors>CodeDevMLH</Authors>
|
||||
<Version>1.6.1.14</Version>
|
||||
<Version>1.6.1.16</Version>
|
||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1743,14 +1743,15 @@ const SlideCreator = {
|
||||
const isVideoPlayerOpen = document.querySelector('.videoPlayerContainer') || document.querySelector('.youtubePlayerContainer');
|
||||
|
||||
if (slide && slide.classList.contains('active') && !document.hidden && (!isVideoPlayerOpen || isVideoPlayerOpen.classList.contains('hide'))) {
|
||||
const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||
const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||
if (currentItemId !== itemId) {
|
||||
console.log(`Slide ${itemId} is no longer active (current: ${currentItemId}), aborting playback.`);
|
||||
event.target.mute(); // Mute just in case
|
||||
return;
|
||||
}
|
||||
event.target.playVideo();
|
||||
// MARK: mark
|
||||
// const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||
// const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||
// if (currentItemId !== itemId) {
|
||||
// console.log(`Slide ${itemId} is no longer active (current: ${currentItemId}), aborting playback.`);
|
||||
// event.target.mute(); // Mute just in case
|
||||
// return;
|
||||
// }
|
||||
event.target.playVideo();
|
||||
|
||||
// Check if it actually started playing after a short delay (handling autoplay blocks)
|
||||
const timeoutId = setTimeout(() => {
|
||||
@@ -1826,10 +1827,13 @@ const SlideCreator = {
|
||||
|
||||
backdrop.addEventListener('play', (event) => {
|
||||
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
|
||||
const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||
const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||
// MARK: mark
|
||||
// const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||
// const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||
|
||||
if (!slide || !slide.classList.contains('active') || currentItemId !== itemId) {
|
||||
// if (!slide || !slide.classList.contains('active') || currentItemId !== itemId) {
|
||||
|
||||
if (!slide || !slide.classList.contains('active')) {
|
||||
console.log(`Local video ${itemId} started playing but is not active, pausing.`);
|
||||
event.target.pause();
|
||||
event.target.currentTime = 0;
|
||||
@@ -2314,8 +2318,6 @@ const SlideshowManager = {
|
||||
}
|
||||
|
||||
currentSlide.classList.add("active");
|
||||
|
||||
STATE.slideshow.currentSlideIndex = index;
|
||||
|
||||
// Restore focus for TV mode navigation continuity
|
||||
requestAnimationFrame(() => {
|
||||
@@ -2350,6 +2352,8 @@ const SlideshowManager = {
|
||||
if (logo) logo.classList.add("animate");
|
||||
}
|
||||
|
||||
STATE.slideshow.currentSlideIndex = index;
|
||||
|
||||
if (index === 0 || !previousVisibleSlide) {
|
||||
const dotsContainer = container.querySelector(".dots-container");
|
||||
if (dotsContainer) {
|
||||
@@ -2704,7 +2708,7 @@ const SlideshowManager = {
|
||||
|
||||
videoBackdrop.play().catch(() => {
|
||||
setTimeout(() => {
|
||||
if (videoBackdrop.paused && slide.classList.contains('active')) {
|
||||
if (videoBackdrop.paused) {
|
||||
console.warn(`Autoplay blocked for ${itemId}, attempting muted fallback`);
|
||||
videoBackdrop.muted = true;
|
||||
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
||||
@@ -2715,7 +2719,7 @@ const SlideshowManager = {
|
||||
}
|
||||
|
||||
// YouTube player
|
||||
const player = STATE.slideshow.videoPlayers?.[itemId];
|
||||
const player = STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[itemId];
|
||||
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
||||
player.loadVideoById({
|
||||
videoId: player._videoId,
|
||||
@@ -2731,8 +2735,6 @@ const SlideshowManager = {
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
if (!slide.classList.contains('active')) return;
|
||||
|
||||
if (player.getPlayerState &&
|
||||
player.getPlayerState() !== YT.PlayerState.PLAYING &&
|
||||
player.getPlayerState() !== YT.PlayerState.BUFFERING) {
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.6.1.14",
|
||||
"version": "1.6.1.16",
|
||||
"changelog": "- fix tv mode issue\n- refactor video playback management",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.14/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "6af6dd96995a90bf91d811467c88da04",
|
||||
"timestamp": "2026-02-13T02:23:28Z"
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.16/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "a478b0f9b3738f830a34cc0c3e1be78c",
|
||||
"timestamp": "2026-02-13T02:53:19Z"
|
||||
},
|
||||
{
|
||||
"version": "1.6.0.2",
|
||||
|
||||
Reference in New Issue
Block a user