Revert "Add dark background for embed video player"

This reverts commit 59cba4803b4600b609da611096f4747000673249.
This commit is contained in:
Yiannis Christodoulou 2025-10-06 19:14:26 +03:00
parent a1479ac392
commit 67bc60066c
2 changed files with 1 additions and 37 deletions

View File

@ -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 = () => {
<VideoJS videoId="video-embed" />
</StrictMode>
);
// 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', () => {

View File

@ -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;