diff --git a/frontend-tools/video-editor/client/src/components/EditingTools.tsx b/frontend-tools/video-editor/client/src/components/EditingTools.tsx index 1b8c0eb2..6f2978c6 100644 --- a/frontend-tools/video-editor/client/src/components/EditingTools.tsx +++ b/frontend-tools/video-editor/client/src/components/EditingTools.tsx @@ -1,4 +1,5 @@ import '../styles/EditingTools.css'; +import { useEffect, useState } from 'react'; interface EditingToolsProps { onSplit: () => void; @@ -29,6 +30,18 @@ const EditingTools = ({ isPlaying = false, isPlayingSegments = false, }: EditingToolsProps) => { + const [isSmallScreen, setIsSmallScreen] = useState(false); + + useEffect(() => { + const checkScreenSize = () => { + setIsSmallScreen(window.innerWidth <= 640); + }; + + checkScreenSize(); + window.addEventListener('resize', checkScreenSize); + return () => window.removeEventListener('resize', checkScreenSize); + }, []); + // Handle play button click with iOS fix const handlePlay = () => { // Ensure lastSeekedPosition is used when play is clicked @@ -47,7 +60,7 @@ const EditingTools = ({
{/* Play Segments button */} - )} + if (createdSegment) { + // Set this segment as selected to show its tooltip + setSelectedSegmentId(createdSegment.id); + logger.debug("Created and selected new segment:", createdSegment.id); + } + }, 100); // Small delay to ensure state is updated + }} + > + + + + + + + New + + {/* Go to start button - play from beginning of cutaway (until next segment) */}