diff --git a/frontend-tools/video-js/src/main.jsx b/frontend-tools/video-js/src/main.jsx index e725345c..a8450efc 100644 --- a/frontend-tools/video-js/src/main.jsx +++ b/frontend-tools/video-js/src/main.jsx @@ -3,30 +3,6 @@ import { createRoot } from 'react-dom/client'; import VideoJS from './VideoJS.jsx'; -// Function to set dark background for embed contexts -const setEmbedBodyBackground = () => { - const embedContainer = document.getElementById('video-js-root-embed'); - const pageEmbed = document.getElementById('page-embed'); - - // Check if we're in embed mode - if (embedContainer || pageEmbed) { - // Store original background to restore later if needed - if (!document.body.dataset.originalBackground) { - document.body.dataset.originalBackground = document.body.style.backgroundColor || ''; - } - - // Set dark background for embed - document.body.style.backgroundColor = '#000'; - document.documentElement.style.backgroundColor = '#000'; - - // Also set margin and padding to 0 for seamless embed - document.body.style.margin = '0'; - document.body.style.padding = '0'; - document.documentElement.style.margin = '0'; - document.documentElement.style.padding = '0'; - } -}; - // Mount the components when the DOM is ready const mountComponents = () => { // Mount main video player @@ -49,18 +25,11 @@ const mountComponents = () => { ); - - // Set dark background when embed player is mounted - setEmbedBodyBackground(); } - - // Also check for embed context even without mounting - setEmbedBodyBackground(); }; -// Expose functions globally for manual triggering +// Expose the mounting function globally for manual triggering window.triggerVideoJSMount = mountComponents; -window.setVideoJSEmbedBackground = setEmbedBodyBackground; // Listen for custom events to trigger mounting document.addEventListener('triggerVideoJSMount', () => { diff --git a/frontend-tools/video-js/src/styles/embed.css b/frontend-tools/video-js/src/styles/embed.css index a9d5bdca..b202c3b5 100644 --- a/frontend-tools/video-js/src/styles/embed.css +++ b/frontend-tools/video-js/src/styles/embed.css @@ -1,11 +1,6 @@ /* ===== EMBED PLAYER STYLES ===== */ /* YouTube-style embed player with fullscreen poster */ -/* Black background for embed page to eliminate white space */ -#page-embed { - background-color: #000 !important; -} - /* Fullscreen poster image - fills entire iframe */ #page-embed .video-js-root-embed .video-js .vjs-poster { position: absolute !important;