diff options
author | Michael <michael.foiani@gmail.com> | 2022-06-08 18:24:53 -0400 |
---|---|---|
committer | Michael <michael.foiani@gmail.com> | 2022-06-08 18:24:53 -0400 |
commit | 48c60bd982734676f972514f7074be6121e7c5df (patch) | |
tree | 9ad01ac2a78bc61f53cc1b377128bf3c7b103b36 /src/client/views/nodes/RecordingBox/ProgressBar.tsx | |
parent | bc6aa7b8e7c9e43901f500d58acb0ebb6450b0a5 (diff) |
big commit. FINALLY got the combining segments to work using ffmpeg using a different workflow. small ui changes as well.
Diffstat (limited to 'src/client/views/nodes/RecordingBox/ProgressBar.tsx')
-rw-r--r-- | src/client/views/nodes/RecordingBox/ProgressBar.tsx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/client/views/nodes/RecordingBox/ProgressBar.tsx b/src/client/views/nodes/RecordingBox/ProgressBar.tsx index a91656cbc..effc3d8a8 100644 --- a/src/client/views/nodes/RecordingBox/ProgressBar.tsx +++ b/src/client/views/nodes/RecordingBox/ProgressBar.tsx @@ -53,11 +53,6 @@ export function ProgressBar(props: ProgressBarProps) { return [...prevOrdered, { endTime, startTime , order }]; }); } - // }props.videos.map((vid, order) => { - // //const { endTime, startTime } = vid - // // TODO: not tranfer the blobs around - // return { ...vid, order }; - // })) }, [props.videos]); useEffect(() => { @@ -96,7 +91,6 @@ export function ProgressBar(props: ProgressBarProps) { } const onPointerDown = (e: React.PointerEvent<HTMLDivElement>) => { - console.log('pointer down') // don't move the videobox element e.stopPropagation() @@ -107,6 +101,20 @@ export function ProgressBar(props: ProgressBarProps) { // don't do anything if null const progressBar = progressBarRef.current if (progressBar == null || clickedSegment.id === progressBar.id) return + + console.log('pointer down') + // if holding shift key, let's remove that segment + if (e.shiftKey) { + // TODO: fix this + const segId = parseInt(clickedSegment.id.split('-')[1]) + const o = ordered[segId].order + setOrdered(prevOrdered => { + return prevOrdered.filter((seg, i) => i !== segId) + }) + + return + } + const ptrId = e.pointerId; progressBar.setPointerCapture(ptrId) |