diff --git a/web/studio/src/components/MediaPlayer.tsx b/web/studio/src/components/MediaPlayer.tsx
index 857307f..1b017c3 100644
--- a/web/studio/src/components/MediaPlayer.tsx
+++ b/web/studio/src/components/MediaPlayer.tsx
@@ -51,9 +51,11 @@ export default function MediaPlayer({ src, type, transcription, locked, onEnded,
const activeElem = cueRefs.current[activeIdx];
const container = sidebarRef.current;
- // Calculate center position
+ // Center the active element in the visible area
const offsetTop = activeElem.offsetTop;
- const centerScroll = offsetTop - (container.clientHeight / 2) + (activeElem.clientHeight / 2);
+ const elementHeight = activeElem.offsetHeight;
+ const containerHeight = container.clientHeight;
+ const centerScroll = offsetTop - (containerHeight / 2) + (elementHeight / 2);
container.scrollTo({
top: centerScroll,
@@ -179,30 +181,34 @@ export default function MediaPlayer({ src, type, transcription, locked, onEnded,
return (
- {/* Unified Player Unit */}
-
-
- {/* Media Section */}
-
-
- {renderMedia()}
-
-
- {locked && (
-
-
- 🔒
-
-
Playback Limited
-
This exclusive content is protected and can only be viewed once.
+ {/* Player + Sidebar Grid */}
+
0 ? 'xl:grid-cols-12' : ''} gap-6 w-full`}>
+ {/* Video Player Container */}
+
0 ? 'xl:col-span-8' : 'w-full'}`}>
+
+
+
+ {renderMedia()}
- )}
-
- {/* Integrated Interactive Sidebar */}
- {shouldShowTranscription && activeCues.length > 0 && (
-
-
+ {locked && (
+
+
+ 🔒
+
+
Playback Limited
+
This exclusive content is protected and can only be viewed once.
+
+ )}
+
+
+
+
+ {/* Interactive Sidebar (Separate Column) */}
+ {shouldShowTranscription && activeCues.length > 0 && (
+
+
+
Interactive
@@ -220,35 +226,35 @@ export default function MediaPlayer({ src, type, transcription, locked, onEnded,
{activeCues.map((cue, idx) => (
- )}
-
+
+ )}
{/* Transcription text now clearly separated below the whole unit */}