import { Tooltip } from '@chakra-ui/react'; import { IoPlayBack } from '@react-icons/all-files/io5/IoPlayBack'; import { IoPlaySkipBack } from '@react-icons/all-files/io5/IoPlaySkipBack'; import { IoPlaySkipForward } from '@react-icons/all-files/io5/IoPlaySkipForward'; import { IoStop } from '@react-icons/all-files/io5/IoStop'; import { setPlayback } from '../../../common/hooks/useSocket'; import { Playstate } from '../../../common/models/OntimeTypes'; import { tooltipDelayMid } from '../../../ontimeConfig'; import TapButton from './TapButton'; import style from './PlaybackControl.module.scss'; interface TransportProps { playback: Playstate; selectedId: string; noEvents: boolean; } export default function Transport(props: TransportProps) { const { playback, selectedId, noEvents } = props; const isRolling = playback === 'roll'; return (
setPlayback.previous()} disabled={isRolling || noEvents} > setPlayback.next()} disabled={isRolling || noEvents} > setPlayback.reload()} disabled={selectedId == null || isRolling || noEvents} > setPlayback.stop()} disabled={(selectedId == null && !isRolling) || noEvents} theme='stop' >
); }