From 03276d7722d69c2f0fa3aabffb028e64c12d1ef0 Mon Sep 17 00:00:00 2001 From: CodeDevMLH <145071728+CodeDevMLH@users.noreply.github.com> Date: Fri, 6 Mar 2026 03:18:13 +0100 Subject: [PATCH] Enhance YouTube player integration with fullscreen and picture-in-picture support --- .../Web/mediaBarEnhanced.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js index 814d54b..09cf995 100644 --- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js +++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js @@ -745,10 +745,11 @@ const SlideUtils = { const ytIframe = this.createElement('iframe', { id: 'modal-yt-player', src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&origin=${encodeURIComponent(window.location.origin)}`, - allow: 'autoplay; encrypted-media', + allow: 'autoplay; encrypted-media; fullscreen; picture-in-picture', style: 'width: 100%; height: 100%; border: none;', + referrerpolicy: 'strict-origin-when-cross-origin', + allowfullscreen: 'true' }); - ytIframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin'); contentContainer.appendChild(ytIframe); overlay.append(closeButton, contentContainer); @@ -1750,8 +1751,9 @@ const SlideCreator = { id: `youtube-player-${itemId}`, src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&origin=${encodeURIComponent(window.location.origin)}`, style: "width: 100%; height: 100%; border: none;", - allow: "autoplay; encrypted-media", - referrerpolicy: "strict-origin-when-cross-origin" + allow: "autoplay; encrypted-media; fullscreen; picture-in-picture", + referrerpolicy: "strict-origin-when-cross-origin", + allowfullscreen: "true" }); videoBackdrop.appendChild(ytPlayerIframe);