Add delay before stopping other video players during slideshow transitions

This commit is contained in:
CodeDevMLH
2026-02-19 03:35:38 +01:00
parent 8b0d6f137d
commit 0534d0458e

View File

@@ -2393,6 +2393,7 @@ const SlideshowManager = {
// Manage Video Playback: Stop others, Play current // Manage Video Playback: Stop others, Play current
// 1. Stop all other YouTube players and local video elements, release connections // 1. Stop all other YouTube players and local video elements, release connections
setTimeout(() => {
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) {
@@ -2417,6 +2418,7 @@ const SlideshowManager = {
} }
}); });
} }
}, CONFIG.fadeTransitionDuration);
// 2. Pause all other HTML5 videos e.g. local trailers // 2. Pause all other HTML5 videos e.g. local trailers
document.querySelectorAll('video').forEach(video => { document.querySelectorAll('video').forEach(video => {