diff --git a/frontend/src/App.css b/frontend/src/App.css index 64b60e9..09e342a 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -6050,6 +6050,67 @@ a.app-footer__about:hover, font-weight: 600; } +/* ── Seek container + Chapter markers ──────────────────────────────────────── */ + +.player-controls__seek-container { + position: relative; + flex: 1; + display: flex; + align-items: center; +} + +.player-controls__seek-container .player-controls__seek { + width: 100%; +} + +.chapter-markers { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; +} + +.chapter-marker__tick { + position: absolute; + width: 3px; + height: 100%; + background: var(--color-accent, #22d3ee); + opacity: 0.6; + pointer-events: all; + cursor: pointer; + transform: translateX(-50%); + border: none; + padding: 0; + font: inherit; +} + +.chapter-marker__tick:hover { + opacity: 1; +} + +.chapter-marker__tooltip { + position: absolute; + bottom: 100%; + left: 50%; + transform: translateX(-50%); + background: var(--color-bg-surface, #1e293b); + color: var(--text-primary, #e2e8f0); + padding: 4px 8px; + border-radius: 4px; + font-size: 0.75rem; + white-space: nowrap; + opacity: 0; + pointer-events: none; + transition: opacity 150ms; + margin-bottom: 4px; +} + +.chapter-marker__tick:hover .chapter-marker__tooltip { + opacity: 1; +} + /* ── Responsive: player controls ───────────────────────────────────────────── */ @media (max-width: 640px) { diff --git a/frontend/src/components/AudioWaveform.tsx b/frontend/src/components/AudioWaveform.tsx index ad1ea2f..7d62d03 100644 --- a/frontend/src/components/AudioWaveform.tsx +++ b/frontend/src/components/AudioWaveform.tsx @@ -1,18 +1,22 @@ import { useEffect, useRef } from "react"; import WaveSurfer from "wavesurfer.js"; +import RegionsPlugin from "wavesurfer.js/dist/plugins/regions.esm.js"; import type { MediaSyncState } from "../hooks/useMediaSync"; +import type { Chapter } from "../api/videos"; interface AudioWaveformProps { mediaSync: MediaSyncState; src: string; + chapters?: Chapter[]; } /** * Audio-only waveform visualiser powered by wavesurfer.js. * Renders a hidden