diff --git a/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx b/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx index 98124425..ec689cd6 100644 --- a/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx +++ b/frontend-tools/video-js/src/components/video-player/VideoJSPlayer.jsx @@ -2510,6 +2510,7 @@ function VideoJSPlayer({ videoId = 'default-video' }) { if (progressControl && progressControl.el() && controlBar && controlBar.el()) { const progressEl = progressControl.el(); const controlBarEl = controlBar.el(); + controlBarEl.style.gap = 0; // Remove progress control from control bar controlBar.removeChild(progressControl); @@ -2547,9 +2548,18 @@ function VideoJSPlayer({ videoId = 'default-video' }) { progressEl.style.transition = 'opacity 0.3s, visibility 0.3s'; // Smooth transition progressEl.style.boxSizing = 'border-box'; // Ensure padding doesn't increase width - // Style control bar + // Style control bar using config values controlBarEl.style.position = 'relative'; controlBarEl.style.width = '100%'; + controlBarEl.style.height = `${PlayerConfig.controlBar.height}em`; + controlBarEl.style.fontSize = `${PlayerConfig.controlBar.fontSize}em`; + controlBarEl.style.backgroundColor = PlayerConfig.controlBar.backgroundColor; + + // Apply same line height to time-related controls + const timeControls = controlBarEl.querySelectorAll('.vjs-time-control'); + timeControls.forEach((timeControl) => { + timeControl.style.lineHeight = `${PlayerConfig.controlBar.height}em`; + }); // Style the progress holder and bars with config colors const progressHolder = progressEl.querySelector('.vjs-progress-holder'); diff --git a/frontend-tools/video-js/src/config/playerConfig.js b/frontend-tools/video-js/src/config/playerConfig.js index ad86ec9a..645ede7b 100644 --- a/frontend-tools/video-js/src/config/playerConfig.js +++ b/frontend-tools/video-js/src/config/playerConfig.js @@ -20,6 +20,18 @@ const PlayerConfig = { // Loaded buffer color bufferColor: 'rgba(255, 255, 255, 0.5)', }, + + // Control bar configuration + controlBar: { + // Background color + backgroundColor: '#FF00000', // 'rgba(0, 0, 0, 0.7)', + + // Height in em units + height: 3, + + // Font size in em units + fontSize: 1.5, + }, }; export default PlayerConfig;