diff --git a/app/sites/[id]/replays/[replayId]/page.tsx b/app/sites/[id]/replays/[replayId]/page.tsx index ca71e0d..a2b7ad4 100644 --- a/app/sites/[id]/replays/[replayId]/page.tsx +++ b/app/sites/[id]/replays/[replayId]/page.tsx @@ -98,19 +98,25 @@ export default function ReplayViewerPage() { playerContainerRef.current.innerHTML = '' } - // Create player + // Calculate dimensions - use container width and maintain aspect ratio + const containerWidth = playerContainerRef.current!.clientWidth + const containerHeight = Math.max(500, Math.min(700, window.innerHeight - 300)) + + // Create player with proper scaling const player = new rrwebPlayer.default({ target: playerContainerRef.current!, props: { events: replayData, - width: playerContainerRef.current!.clientWidth, - height: Math.min(600, window.innerHeight - 300), + width: containerWidth, + height: containerHeight, autoPlay: false, showController: true, speed: speed, skipInactive: true, showWarning: false, showDebug: false, + // Enable responsive scaling + UNSAFE_replayCanvas: false, }, }) @@ -192,7 +198,7 @@ export default function ReplayViewerPage() { {/* Player Container */}
{loadingData ? (