|
|
|
@ -11,7 +11,7 @@ import { FiPlay, FiPause, FiSquare } from 'react-icons/fi'
|
|
|
|
|
import { useInterval } from './generics/useInterval'
|
|
|
|
|
import { IconButton } from '../styles/IconButton'
|
|
|
|
|
|
|
|
|
|
export const RsvpPlayer = () => {
|
|
|
|
|
export const PlayerControl = () => {
|
|
|
|
|
const dispatch = useDispatch()
|
|
|
|
|
const running = useSelector(selectRunning)
|
|
|
|
|
const hasNext = useSelector(hasNextSegment)
|
|
|
|
@ -26,15 +26,13 @@ export const RsvpPlayer = () => {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<IconButton Icon={FiSquare} onClick={() => dispatch(stop())} />
|
|
|
|
|
<IconButton
|
|
|
|
|
Icon={running ? FiPause : FiPlay}
|
|
|
|
|
onClick={() => dispatch(running ? pause() : start())}
|
|
|
|
|
disabled={!hasNext}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<>
|
|
|
|
|
<IconButton Icon={FiSquare} onClick={() => dispatch(stop())} />
|
|
|
|
|
<IconButton
|
|
|
|
|
Icon={running ? FiPause : FiPlay}
|
|
|
|
|
onClick={() => dispatch(running ? pause() : start())}
|
|
|
|
|
disabled={!hasNext}
|
|
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|