diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js index ae802a6..789fbe4 100644 --- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js +++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js @@ -1853,11 +1853,12 @@ const SlideCreator = { } else if (!isYoutube) { isVideo = true; + const videoSrc = (typeof trailerUrl === 'object' ? trailerUrl.url : trailerUrl); const videoAttributes = { className: "backdrop video-backdrop", - src: (typeof trailerUrl === 'object' ? trailerUrl.url : trailerUrl), - preload: "auto", + preload: "none", disablePictureInPicture: true, + "data-src": videoSrc, style: "object-fit: cover; object-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none;" }; @@ -2356,7 +2357,7 @@ const SlideshowManager = { currentSlide.classList.add("active"); // Manage Video Playback: Stop others, Play current - // 1. Stop all other YouTube players and local video elements + // 1. Stop all other YouTube players and local video elements, release connections if (STATE.slideshow.videoPlayers) { Object.keys(STATE.slideshow.videoPlayers).forEach(id => { if (id !== currentItemId) { @@ -2366,11 +2367,17 @@ const SlideshowManager = { if (typeof p.pauseVideo === 'function') { p.pauseVideo(); } - // HTML5