diff --git a/frontend-tools/video-js/src/VideoJS.css b/frontend-tools/video-js/src/VideoJS.css index 8b1242d2..bf8ac341 100644 --- a/frontend-tools/video-js/src/VideoJS.css +++ b/frontend-tools/video-js/src/VideoJS.css @@ -26,9 +26,9 @@ html { visibility: hidden !important; } - /* Simple fix: Move seekbar up by 10px on touch devices */ + /* Simple fix: Move seekbar closer to controls on touch devices */ .video-js .vjs-progress-control { - bottom: 56px !important; /* Move up 10px from original 46px */ + bottom: 44px !important; /* Much closer to control bar - minimal gap */ } /* Make seekbar more touch-friendly on Android */ @@ -551,9 +551,9 @@ button.vjs-button > .vjs-icon-placeholder:before { border-radius: 0 !important; } - /* Move seekbar up by 10px on small mobile to prevent accidental button touches */ + /* Move seekbar closer to controls on small mobile */ .video-js .vjs-progress-control { - bottom: 56px !important; /* Move up 10px from original 46px */ + bottom: 44px !important; /* Much closer to control bar - minimal gap */ } .video-container { diff --git a/frontend-tools/video-js/src/components/controls/SeekIndicator.css b/frontend-tools/video-js/src/components/controls/SeekIndicator.css index 63f9fb32..2740a47d 100644 --- a/frontend-tools/video-js/src/components/controls/SeekIndicator.css +++ b/frontend-tools/video-js/src/components/controls/SeekIndicator.css @@ -65,6 +65,39 @@ overflow: hidden !important; } +/* Responsive sizing for mobile devices */ +@media (max-width: 768px) { + .vjs-seek-indicator { + top: calc(50% - 30px) !important; /* Move up slightly to avoid seekbar on tablet */ + } + + .youtube-seek-circle { + width: 60px !important; + height: 60px !important; + } + + .youtube-seek-icon svg { + width: 24px !important; + height: 24px !important; + } +} + +@media (max-width: 480px) { + .vjs-seek-indicator { + top: calc(50% - 40px) !important; /* Move up more to avoid seekbar on mobile */ + } + + .youtube-seek-circle { + width: 50px !important; + height: 50px !important; + } + + .youtube-seek-icon svg { + width: 20px !important; + height: 20px !important; + } +} + .youtube-seek-icon { display: flex !important; align-items: center !important; diff --git a/frontend-tools/video-js/src/components/controls/SeekIndicator.js b/frontend-tools/video-js/src/components/controls/SeekIndicator.js index b9d2e3c5..fd8dab9e 100644 --- a/frontend-tools/video-js/src/components/controls/SeekIndicator.js +++ b/frontend-tools/video-js/src/components/controls/SeekIndicator.js @@ -48,13 +48,32 @@ class SeekIndicator extends Component { clearTimeout(this.showTimeout); } + // Get responsive size based on screen width for all directions + const isMobile = window.innerWidth <= 480; + const isTablet = window.innerWidth <= 768 && window.innerWidth > 480; + + let circleSize, iconSize, textSize; + if (isMobile) { + circleSize = '50px'; + iconSize = '20'; + textSize = '8px'; + } else if (isTablet) { + circleSize = '60px'; + iconSize = '22'; + textSize = '9px'; + } else { + circleSize = '80px'; + iconSize = '24'; + textSize = '10px'; + } + // Set content based on direction - YouTube-style circular design if (direction === 'forward') { iconEl.innerHTML = `