From b229d94a8da7b258f1b49867e8cee225d5feb735 Mon Sep 17 00:00:00 2001
From: vracto
Date: Wed, 30 Jul 2025 16:56:10 -0500
Subject: add forward and backward buttons to non-fullscreen view (#495)
* feat: create external tools section (#493)
* feat: create external tools section
* fix: better wording
* add forward and backward buttons to non-fullscreen
---------
Co-authored-by: Dominik K.
Co-authored-by: Maze Winther
---
apps/web/src/components/editor/preview-panel.tsx | 60 +++++++++++++++++++-----
1 file changed, 47 insertions(+), 13 deletions(-)
(limited to 'apps/web/src/components/editor/preview-panel.tsx')
diff --git a/apps/web/src/components/editor/preview-panel.tsx b/apps/web/src/components/editor/preview-panel.tsx
index 4cc35bb5..39c6795f 100644
--- a/apps/web/src/components/editor/preview-panel.tsx
+++ b/apps/web/src/components/editor/preview-panel.tsx
@@ -826,6 +826,18 @@ function PreviewToolbar({
setCanvasSizeToOriginal(aspectRatio);
};
+ const totalDuration = getTotalDuration();
+
+ const skipBackward = () => {
+ const newTime = Math.max(0, currentTime - 1);
+ setCurrentTime(newTime);
+ };
+
+ const skipForward = () => {
+ const newTime = Math.min(totalDuration, currentTime + 1);
+ setCurrentTime(newTime);
+ };
+
if (isExpanded) {
return (
-
+
+
+
+
+
--
cgit v1.3.1