上下键移动

This commit is contained in:
IndieKKY
2024-03-19 22:14:47 +08:00
parent 9b2d620cdf
commit 13e90c1ab7
8 changed files with 94 additions and 9 deletions

View File

@@ -5,8 +5,8 @@ import {setNeedScroll} from '../redux/envReducer'
const useSubtitle = () => {
const dispatch = useAppDispatch()
const move = useCallback((time: number) => {
window.parent.postMessage({type: 'move', time}, '*')
const move = useCallback((time: number, togglePause: boolean) => {
window.parent.postMessage({type: 'move', time, togglePause}, '*')
}, [])
const scrollIntoView = useCallback((ref: React.RefObject<HTMLDivElement>) => {