Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(transport): remove non-functional loop and fullscreen buttons

Etienne Lescot6334f7e5c5a5
diff --git a/src/components/ai-edition/NewEditorShell.tsx b/src/components/ai-edition/NewEditorShell.tsx
index 8707b1079..b530662c8 100644
--- a/src/components/ai-edition/NewEditorShell.tsx
+++ b/src/components/ai-edition/NewEditorShell.tsx
@@ -69,7 +69,6 @@ export function NewEditorShell() {
Record<string, "pending" | "running" | "failed">
>({});
const [videoElement, setVideoElement] = useState<HTMLVideoElement | null>(null);
- const [loop, setLoop] = useState(false);
// v4 shell: three modes (Media / Edit / Rec), a collapsible agent (chat)
// column, and a floating facet inspector over the stage.
const [mode, setMode] = useState<EditorMode>("edit");
@@ -439,24 +438,6 @@ export function NewEditorShell() {
handleTimeChange(next.timelineStartSec);
}, [clips, currentTimeSec, handleSeek, handleTimeChange]);
- const handleToggleLoop = useCallback(() => {
- setLoop((v) => {
- const next = !v;
- if (videoElement) videoElement.loop = next;
- return next;
- });
- }, [videoElement]);
-
- const handleExpand = useCallback(() => {
- const el = videoElement?.parentElement;
- if (!el) return;
- if (globalThis.document.fullscreenElement) {
- void globalThis.document.exitFullscreen();
- } else {
- void el.requestFullscreen?.();
- }
- }, [videoElement]);
-
const handleTranscribe = useCallback(async () => {
if (!document || !document.project.primaryAssetId) return;
const assetId = document.project.primaryAssetId;
@@ -1271,12 +1252,9 @@ export function NewEditorShell() {
onDropAsset={handleDropAsset}
videoSources={videoSources}
playing={playing}
- loop={loop}
onTogglePlay={togglePlay}
onPrevClip={handlePrevClip}
onNextClip={handleNextClip}
- onToggleLoop={handleToggleLoop}
- onExpand={handleExpand}
onEditClip={setEditClipTarget}
/>
</div>
diff --git a/src/components/ai-edition/TransportBar.tsx b/src/components/ai-edition/TransportBar.tsx
index 73ee43fee..dc36a93c6 100644
--- a/src/components/ai-edition/TransportBar.tsx
+++ b/src/components/ai-edition/TransportBar.tsx
@@ -1,4 +1,4 @@
-import { Maximize2, Pause, Play, Repeat, SkipBack, SkipForward } from "lucide-react";
+import { Pause, Play, SkipBack, SkipForward } from "lucide-react";
import { memo } from "react";
import { useScopedT } from "@/contexts/I18nContext";
import type { AxcutClip } from "@/lib/ai-edition/schema";
@@ -13,14 +13,11 @@ function formatTC(sec: number): string {
interface TransportBarProps {
playing: boolean;
- loop: boolean;
currentTimeSec: number;
clips: AxcutClip[];
onTogglePlay: () => void;
onPrevClip: () => void;
onNextClip: () => void;
- onToggleLoop: () => void;
- onExpand: () => void;
onSeek: (sec: number) => void;
}
@@ -28,18 +25,14 @@ interface TransportBarProps {
// so the header row covers both timeline tools and playback in one line.
export const TransportBar = memo(function TransportBar({
playing,
- loop,
currentTimeSec,
clips,
onTogglePlay,
onPrevClip,
onNextClip,
- onToggleLoop,
- onExpand,
onSeek,
}: TransportBarProps) {
const te = useScopedT("editor");
- const tc = useScopedT("common");
const virtualDurationSec = clips.reduce(
(acc, c) => acc + (c.timelineEndSec - c.timelineStartSec),
0,
@@ -80,25 +73,6 @@ export const TransportBar = memo(function TransportBar({
>
<SkipForward size={13} />
</button>
- <button
- type="button"
- className={styles.tbtn}
- title={te("transport.loop")}
- aria-label={te("transport.loop")}
- aria-pressed={loop}
- onClick={onToggleLoop}
- >
- <Repeat size={13} />
- </button>
- <button
- type="button"
- className={styles.tbtn}
- title={tc("playback.fullscreen")}
- aria-label={tc("playback.fullscreen")}
- onClick={onExpand}
- >
- <Maximize2 size={13} />
- </button>
<span className={styles.time}>
<span>{formatTC(currentTimeSec)}</span>
<span className={styles.sep}>/</span>
diff --git a/src/components/ai-edition/v4/V4Timeline.tsx b/src/components/ai-edition/v4/V4Timeline.tsx
index 236369ce4..9d8990944 100644
--- a/src/components/ai-edition/v4/V4Timeline.tsx
+++ b/src/components/ai-edition/v4/V4Timeline.tsx
@@ -210,12 +210,9 @@ export function V4Timeline({
onDropAsset,
videoSources = [],
playing,
- loop,
onTogglePlay,
onPrevClip,
onNextClip,
- onToggleLoop,
- onExpand,
onEditClip,
}: {
tl: TimelineApi;
@@ -225,12 +222,9 @@ export function V4Timeline({
onDropAsset?: (assetId: string) => void;
videoSources?: VideoSource[];
playing: boolean;
- loop: boolean;
onTogglePlay: () => void;
onPrevClip: () => void;
onNextClip: () => void;
- onToggleLoop: () => void;
- onExpand: () => void;
/** Opens the (now single, shell-level) EditClipModal for this clip —
* trim in/out and crop both live there per-clip. */
onEditClip: (clip: AxcutClip) => void;
@@ -1189,14 +1183,11 @@ export function V4Timeline({
)}
<TransportBar
playing={playing}
- loop={loop}
currentTimeSec={effectiveTimeSec}
clips={clips}
onTogglePlay={onTogglePlay}
onPrevClip={onPrevClip}
onNextClip={onNextClip}
- onToggleLoop={onToggleLoop}
- onExpand={onExpand}
onSeek={setCurrentTime}
/>
<div className={styles.tlHints}>