feat: Introduce pauseAfterSeek option to the video player, refresh landing page content and animations, and update the dashboard image.

This commit is contained in:
Yusuf İpek
2026-02-26 15:19:11 +03:00
parent 8d59095e72
commit bbf44fd0aa
9 changed files with 512 additions and 821 deletions
+525 -844
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -34,7 +34,11 @@ interface CommentsPaneProps {
handleExportComments: (format: 'csv' | 'pdf') => void;
canResolveComments: boolean;
handleResolveComment: (commentId: string, currentlyResolved: boolean) => void;
handleSeekToTimestamp: (timestamp: number, annotation?: string | null) => void;
handleSeekToTimestamp: (
timestamp: number,
annotation?: string | null,
options?: { pauseAfterSeek?: boolean }
) => void;
currentUserId: string | null;
projectOwnerId: string;
editingCommentId: string | null;
@@ -294,7 +298,7 @@ export const CommentsPane = memo(function CommentsPane({
<div className="flex items-center gap-1 shrink-0">
<button
onClick={() => handleSeekToTimestamp(comment.timestamp, comment.annotationData)}
onClick={() => handleSeekToTimestamp(comment.timestamp, comment.annotationData, { pauseAfterSeek: true })}
className="flex items-center gap-1 text-xs text-primary hover:underline px-1.5 py-0.5 rounded bg-primary/10 hover:bg-primary/20 transition-colors"
title="Jump to this timestamp"
>
@@ -740,7 +740,11 @@ export function useVideoPlayer({
}
}, [isPlaying, playerRef]);
const handleSeekToTimestamp = useCallback((timestamp: number, annotation?: string | null) => {
const handleSeekToTimestamp = useCallback((
timestamp: number,
annotation?: string | null,
options?: { pauseAfterSeek?: boolean }
) => {
setCurrentTime(timestamp);
if (playerRef.current?.seekTo) {
const playerState = playerRef.current.getPlayerState?.();
@@ -751,7 +755,9 @@ export function useVideoPlayer({
: isPlaying;
playerRef.current.seekTo(timestamp, true);
if (wasPlayingBeforeSeek) {
if (options?.pauseAfterSeek) {
playerRef.current.pauseVideo();
} else if (wasPlayingBeforeSeek) {
playerRef.current.playVideo();
} else {
playerRef.current.pauseVideo();
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB